data-cleaning-env-final / test_inference.py
disha2005's picture
tested file
be12e87
Raw
History Blame Contribute Delete
583 Bytes
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)