-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.py
More file actions
52 lines (43 loc) · 1.18 KB
/
Copy pathrun_tests.py
File metadata and controls
52 lines (43 loc) · 1.18 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
#!/usr/bin/env python3
"""
Quick Test Runner for Audio-Formation
Runs core tests while skipping problematic ones
"""
import subprocess
import sys
from pathlib import Path
def run_tests():
"""Run tests with sensible defaults"""
print("🧪 Audio-Formation Test Runner")
print("=" * 50)
# Check if we're in the right directory
if not Path("src").exists():
print("❌ Not in project root directory")
return False
# Run unit tests only (skip E2E and dashboard tests)
print("📋 Running Unit Tests...")
cmd = [
sys.executable,
"-m",
"pytest",
"tests/",
"-v",
"--tb=short",
"-k",
"not e2e and not dashboard",
"--cov=src",
"--cov-report=term-missing",
"--cov-fail-under=60",
]
try:
result = subprocess.run(cmd, cwd=".", capture_output=False)
return result.returncode == 0
except KeyboardInterrupt:
print("\n⚠️ Tests interrupted")
return False
except Exception as e:
print(f"❌ Error running tests: {e}")
return False
if __name__ == "__main__":
success = run_tests()
sys.exit(0 if success else 1)