-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tests.py
More file actions
34 lines (27 loc) · 723 Bytes
/
Copy pathrun_tests.py
File metadata and controls
34 lines (27 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
"""
Test runner script for Blink.
This script runs all automated tests using pytest.
Run this script to execute the full test suite.
"""
import subprocess
import sys
import os
def run_tests():
"""Run the test suite."""
print("Running Blink test suite...")
print("=" * 50)
# Change to the project root directory
project_root = os.path.dirname(os.path.abspath(__file__))
os.chdir(project_root)
# Run pytest
result = subprocess.run([
sys.executable, "-m", "pytest",
"tests/",
"-v",
"--tb=short"
], capture_output=False)
return result.returncode
if __name__ == "__main__":
exit_code = run_tests()
sys.exit(exit_code)