-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.py
More file actions
55 lines (43 loc) · 1.05 KB
/
Copy pathrun_tests.py
File metadata and controls
55 lines (43 loc) · 1.05 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python
"""
Test Runner Script for SnapFlow
Runs the complete test suite and reports results.
"""
import sys
import subprocess
from pathlib import Path
def main():
"""Run all tests and report results."""
print("=" * 70)
print("SnapFlow Test Suite")
print("=" * 70)
print()
# Check if pytest is available
try:
import pytest
except ImportError:
print("❌ pytest not installed. Installing...")
subprocess.check_call([
sys.executable, "-m", "pip", "install", "-q",
"pytest", "pytest-cov", "pytest-mock"
])
import pytest
# Run tests
print("Running tests...")
print()
args = [
"-v",
"--tb=short",
"--color=yes",
]
result = pytest.main(args)
print()
print("=" * 70)
if result == 0:
print("✅ All tests passed!")
else:
print(f"❌ Tests failed with exit code: {result}")
print("=" * 70)
return result
if __name__ == "__main__":
sys.exit(main())