File size: 583 Bytes
be12e87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import subprocess

print("🚀 Running inference.py test...\n")

try:
    result = subprocess.run(
        ["python", "inference.py"],
        capture_output=True,
        text=True,
        timeout=60
    )

    print("✅ STDOUT:\n")
    print(result.stdout)

    if result.stderr:
        print("\n⚠️ STDERR:\n")
        print(result.stderr)

    if result.returncode == 0:
        print("\n🎉 TEST PASSED: inference.py ran successfully")
    else:
        print(f"\n❌ TEST FAILED: Exit code {result.returncode}")

except Exception as e:
    print("💥 Test crashed:", e)