File size: 826 Bytes
d545f81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Test runner script for XENO Bot
Run this script to execute all tests with coverage reporting
"""
import sys
import subprocess


def run_tests():
    """Run all tests with coverage"""
    print("=" * 70)
    print("Running XENO Bot Unit Tests")
    print("=" * 70)
    
    # Run pytest with coverage
    cmd = [
        sys.executable, "-m", "pytest",
        "--cov=src",
        "--cov-report=term-missing",
        "--cov-report=html",
        "-v"
    ]
    
    result = subprocess.run(cmd)
    
    print("\n" + "=" * 70)
    if result.returncode == 0:
        print("✓ All tests passed!")
        print("Coverage report generated in htmlcov/index.html")
    else:
        print("✗ Some tests failed!")
    print("=" * 70)
    
    return result.returncode


if __name__ == "__main__":
    sys.exit(run_tests())