-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.py
More file actions
42 lines (35 loc) · 1.11 KB
/
run_tests.py
File metadata and controls
42 lines (35 loc) · 1.11 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
#!/usr/bin/env python3
"""
Test runner for AgentDiff Coordination
Simple script to run the core tests.
"""
import sys
import subprocess
from pathlib import Path
def main():
"""Run the test suite"""
print("🧪 Running AgentDiff Coordination Tests")
print("=" * 50)
# Change to project root
project_root = Path(__file__).parent
# Run pytest with common options
cmd = [
sys.executable, "-m", "pytest",
"tests/",
"-v", # Verbose output
"--tb=short", # Shorter traceback format
"--strict-markers", # Strict marker checking
"--disable-warnings", # Less noise
]
try:
result = subprocess.run(cmd, cwd=project_root, check=True)
print("\n✅ All tests passed!")
return 0
except subprocess.CalledProcessError as e:
print(f"\n❌ Tests failed with exit code {e.returncode}")
return e.returncode
except FileNotFoundError:
print("❌ pytest not found. Install with: pip install pytest")
return 1
if __name__ == "__main__":
sys.exit(main())