Spaces:
Sleeping
Sleeping
File size: 550 Bytes
3f61e65 |
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 |
import subprocess
import sys
import os
import platform
def run_tests():
print("Running tests...")
if platform.system() == "Windows":
python = "venv/Scripts/python"
else:
python = "venv/bin/python"
try:
subprocess.run(
[python, "-m", "pytest", "tests/", "-v"],
check=True
)
print("\nAll tests passed successfully!")
except subprocess.CalledProcessError:
print("\nSome tests failed!")
sys.exit(1)
if __name__ == "__main__":
run_tests() |