diff --git a/setup.cfg b/setup.cfg index 0d89aba..3fdf3d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,4 +8,4 @@ test=pytest [tool:pytest] # Make sure we only include those files suffixed with -tests -python_files = tests/*_tests.py +python_files = tests/test_*.py diff --git a/tests/di_tests.py b/tests/test_di.py similarity index 99% rename from tests/di_tests.py rename to tests/test_di.py index 18a7ae4..6815d8a 100644 --- a/tests/di_tests.py +++ b/tests/test_di.py @@ -12,10 +12,11 @@ from di import injector, Key, DependencyMap, ContextualDependencyMap, PatchedDependencyMap, MetaInject -PY3 = sys.version_info[0] >= 3 +PY3 = sys.hexversion >= 0x03000000 +PY35 = sys.hexversion >= 0x03050000 -# Import tests using Python3 syntax -if PY3: +# Import tests using Python3 syntax when >=3.5 +if PY35: from .py3 import *