summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/meta/test_ensure_type_hints.py5
-rw-r--r--tests/meta/test_mro.py6
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/meta/test_ensure_type_hints.py b/tests/meta/test_ensure_type_hints.py
index f647b45..7a351ec 100644
--- a/tests/meta/test_ensure_type_hints.py
+++ b/tests/meta/test_ensure_type_hints.py
@@ -7,13 +7,14 @@ Original notes by John L. Villalovos
import inspect
from typing import Tuple, Type
+import _pytest
import toml
import gitlab.mixins
import gitlab.v4.objects
-def pytest_generate_tests(metafunc):
+def pytest_generate_tests(metafunc: _pytest.python.Metafunc) -> None:
"""Find all of the classes in gitlab.v4.objects and pass them to our test
function"""
@@ -54,7 +55,7 @@ def pytest_generate_tests(metafunc):
class TestTypeHints:
- def test_check_get_function_type_hints(self, class_info: Tuple[str, Type]):
+ def test_check_get_function_type_hints(self, class_info: Tuple[str, Type]) -> None:
"""Ensure classes derived from GetMixin have defined a 'get()' method with
correct type-hints.
"""
diff --git a/tests/meta/test_mro.py b/tests/meta/test_mro.py
index 8f67b77..8558a8b 100644
--- a/tests/meta/test_mro.py
+++ b/tests/meta/test_mro.py
@@ -49,7 +49,7 @@ import pytest
import gitlab.v4.objects
-def test_show_issue():
+def test_show_issue() -> None:
"""Test case to demonstrate the TypeError that occurs"""
class RESTObject(object):
@@ -61,7 +61,7 @@ def test_show_issue():
with pytest.raises(TypeError) as exc_info:
# Wrong ordering here
- class Wrongv4Object(RESTObject, Mixin):
+ class Wrongv4Object(RESTObject, Mixin): # type: ignore
...
# The error message in the exception should be:
@@ -76,7 +76,7 @@ def test_show_issue():
...
-def test_mros():
+def test_mros() -> None:
"""Ensure objects defined in gitlab.v4.objects have REST* as last item in
class definition.