Orienter / scripts /run_tests.py
stereoid's picture
Add files using upload-large-folder tool
6d35aff verified
Raw
History Blame Contribute Delete
536 Bytes
"""Run the public offline suite without creating bytecode in the release tree."""
import os
import sys
import unittest
from pathlib import Path
def main():
os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
sys.dont_write_bytecode = True
root = Path(__file__).resolve().parents[1]
suite = unittest.defaultTestLoader.discover(str(root / "tests"), pattern="test_*.py")
result = unittest.TextTestRunner(verbosity=2).run(suite)
return 0 if result.wasSuccessful() else 1
if __name__ == "__main__":
sys.exit(main())