Files
thechart/run_tests.py
William Valentin c20c4478a6 feat: Add coverage, iniconfig, pluggy, pygments, pytest, pytest-cov, and pytest-mock as dependencies
- Added coverage version 7.10.1 with multiple wheel distributions.
- Added iniconfig version 2.1.0 with its wheel distribution.
- Added pluggy version 1.6.0 with its wheel distribution.
- Added pygments version 2.19.2 with its wheel distribution.
- Added pytest version 8.4.1 with its wheel distribution and dependencies.
- Added pytest-cov version 6.2.1 with its wheel distribution and dependencies.
- Added pytest-mock version 3.14.1 with its wheel distribution and dependencies.
- Updated dev-dependencies to include coverage, pytest, pytest-cov, and pytest-mock.
- Updated requires-dist to specify minimum versions for coverage, pytest, pytest-cov, and pytest-mock.
2025-07-28 17:53:19 -07:00

46 lines
1018 B
Python

#!/usr/bin/env python3
"""
Test runner script for TheChart application.
Run this script to execute all tests with coverage reporting.
"""
import os
import subprocess
import sys
def run_tests():
"""Run all tests with coverage reporting."""
# Change to project root directory
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.chdir(project_root)
print("Running TheChart tests with coverage...")
print(f"Project root: {project_root}")
# Run pytest with coverage
cmd = [
sys.executable,
"-m",
"pytest",
"tests/",
"--verbose",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml",
]
try:
result = subprocess.run(cmd, check=False)
return result.returncode
except Exception as e:
print(f"Error running tests: {e}")
return 1
if __name__ == "__main__":
exit_code = run_tests()
sys.exit(exit_code)