feat: Add test scripts and runner for TheChart application
- Created demo_failing_test.py to demonstrate pre-commit blocking with a failing test. - Added run_tests.py for executing all tests with coverage reporting. - Introduced test.py as a quick test runner for the application, providing coverage reports and user-friendly output.
This commit is contained in:
@@ -65,3 +65,23 @@ repos:
|
||||
# - id: uv-export
|
||||
# - id: pip-compile
|
||||
# args: [requirements.in, -o, requirements.txt]
|
||||
########################################################
|
||||
# Run core tests before commit to ensure basic functionality
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pytest-check
|
||||
name: pytest-check (core tests)
|
||||
entry: uv run pytest
|
||||
language: system
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
args:
|
||||
[
|
||||
--tb=short,
|
||||
--quiet,
|
||||
--no-cov,
|
||||
"tests/test_data_manager.py::TestDataManager::test_init",
|
||||
"tests/test_data_manager.py::TestDataManager::test_initialize_csv_creates_file_with_headers",
|
||||
"tests/test_data_manager.py::TestDataManager::test_load_data_with_valid_data",
|
||||
]
|
||||
stages: [pre-commit]
|
||||
|
||||
Reference in New Issue
Block a user