diff options
Diffstat (limited to 'run_tests')
-rwxr-xr-x | run_tests | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -18,6 +18,7 @@ | |||
18 | import os | 18 | import os |
19 | import subprocess | 19 | import subprocess |
20 | import sys | 20 | import sys |
21 | |||
21 | import pytest | 22 | import pytest |
22 | 23 | ||
23 | 24 | ||
@@ -38,12 +39,20 @@ def run_flake8(): | |||
38 | ).returncode | 39 | ).returncode |
39 | 40 | ||
40 | 41 | ||
42 | def run_isort(): | ||
43 | """Returns the exit code from isort.""" | ||
44 | return subprocess.run( | ||
45 | [sys.executable, "-m", "isort", "--check", ROOT_DIR], check=False | ||
46 | ).returncode | ||
47 | |||
48 | |||
41 | def main(argv): | 49 | def main(argv): |
42 | """The main entry.""" | 50 | """The main entry.""" |
43 | checks = ( | 51 | checks = ( |
44 | lambda: pytest.main(argv), | 52 | lambda: pytest.main(argv), |
45 | run_black, | 53 | run_black, |
46 | run_flake8, | 54 | run_flake8, |
55 | run_isort, | ||
47 | ) | 56 | ) |
48 | return 0 if all(not c() for c in checks) else 1 | 57 | return 0 if all(not c() for c in checks) else 1 |
49 | 58 | ||