Files
cibuildwheel/bin/run_tests.py
T
Henry SchreinerandJoe Rickerby d2772c2293 refactor: subprocess.run (#592)
* change check_call to run

* refactor: change check_output to run

* Apply suggestions from code review

Co-authored-by: Joe Rickerby <joerick@mac.com>

Co-authored-by: Joe Rickerby <joerick@mac.com>
2021-02-14 12:56:33 -05:00

21 lines
621 B
Python
Executable File

#!/usr/bin/env python3
import os
import subprocess
import sys
from pathlib import Path
if __name__ == '__main__':
# move cwd to the project root
os.chdir(Path(__file__).resolve().parents[1])
# run the unit tests
unit_test_args = [sys.executable, '-m', 'pytest', 'unit_test']
# run the docker unit tests only on Linux
if sys.platform.startswith('linux'):
unit_test_args += ['--run-docker']
subprocess.run(unit_test_args, check=True)
# run the integration tests
subprocess.run([sys.executable, '-m', 'pytest', '-x', '--durations', '0', '--timeout=2400', 'test'], check=True)