summaryrefslogtreecommitdiff
path: root/tests/test_mypy.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_mypy.py')
-rw-r--r--tests/test_mypy.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_mypy.py b/tests/test_mypy.py
index 8258e7e..b13cdcc 100644
--- a/tests/test_mypy.py
+++ b/tests/test_mypy.py
@@ -1,4 +1,5 @@
import pathlib
+import sys
import unittest
import mypy.api
@@ -9,8 +10,11 @@ test_modules = ['rsa', 'tests']
class MypyRunnerTest(unittest.TestCase):
def test_run_mypy(self):
proj_root = pathlib.Path(__file__).parent.parent
- args = ['--incremental', '--ignore-missing-imports'] + [str(proj_root / dirname) for dirname
- in test_modules]
+ args = [
+ '--incremental',
+ '--ignore-missing-imports',
+ f'--python-version={sys.version_info.major}.{sys.version_info.minor}'
+ ] + [str(proj_root / dirname) for dirname in test_modules]
result = mypy.api.run(args)