|
|
""" |
|
|
Test Runner for AI-Powered Hiring Assessment Platform |
|
|
This script runs all tests in the test suite. |
|
|
""" |
|
|
|
|
|
import unittest |
|
|
import sys |
|
|
import os |
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '.')) |
|
|
|
|
|
def run_tests(): |
|
|
"""Run all tests in the test suite.""" |
|
|
print("Running comprehensive test suite for AI-Powered Hiring Assessment Platform...") |
|
|
|
|
|
|
|
|
loader = unittest.TestLoader() |
|
|
start_dir = 'tests' |
|
|
suite = loader.discover(start_dir, pattern='test_*.py') |
|
|
|
|
|
runner = unittest.TextTestRunner(verbosity=2) |
|
|
result = runner.run(suite) |
|
|
|
|
|
|
|
|
print(f"\nTests run: {result.testsRun}") |
|
|
print(f"Failures: {len(result.failures)}") |
|
|
print(f"Errors: {len(result.errors)}") |
|
|
print(f"Success: {result.wasSuccessful()}") |
|
|
|
|
|
return result.wasSuccessful() |
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
success = run_tests() |
|
|
sys.exit(0 if success else 1) |