mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2025-12-18 01:14:39 -06:00
21 lines
538 B
Python
21 lines
538 B
Python
#!/usr/bin/env python
|
|
"""Simple test runner to check model tests."""
|
|
import subprocess
|
|
import sys
|
|
|
|
result = subprocess.run(
|
|
[sys.executable, "-m", "pytest", "-m", "unit and models", "-v", "--tb=short"],
|
|
capture_output=True,
|
|
text=True
|
|
)
|
|
|
|
with open("test_results_model.txt", "w", encoding="utf-8") as f:
|
|
f.write(result.stdout)
|
|
f.write("\n")
|
|
f.write(result.stderr)
|
|
f.write(f"\n\nExit code: {result.returncode}\n")
|
|
|
|
print("Test results written to test_results_model.txt")
|
|
print(f"Exit code: {result.returncode}")
|
|
|