Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
- Introduced `quick_test.py` for running specific test categories (unit, integration, theme, all). - Updated `run_tests.py` to improve test execution and reporting, including coverage. - Removed outdated test scripts for keyboard shortcuts, menu theming, note saving, and entry updating. - Added new test script `test_theme_changing.py` to verify theme changing functionality. - Consolidated integration tests into `test_integration.py` for comprehensive testing of TheChart application. - Updated theme manager to ensure color retrieval works correctly. - Modified test constants to import from the correct module path.
1.7 KiB
1.7 KiB
Test Scripts Migration Notice
⚠️ Important: Test Structure Changed
The individual test scripts in this directory have been consolidated into a unified test suite.
Old Structure (Deprecated)
test_note_saving.pytest_update_entry.pytest_keyboard_shortcuts.pytest_theme_changing.pytest_menu_theming.py
New Structure (Current)
All functionality is now in:
tests/test_integration.py- Comprehensive integration teststests/test_*.py- Unit tests for specific modulesscripts/run_tests.py- Main test runnerscripts/quick_test.py- Quick test runner for specific categories
How to Run Tests
Run All Tests
cd /home/will/Code/thechart
.venv/bin/python scripts/run_tests.py
Run Specific Test Categories
# Unit tests only
.venv/bin/python scripts/quick_test.py unit
# Integration tests only
.venv/bin/python scripts/quick_test.py integration
# Theme-related tests only
.venv/bin/python scripts/quick_test.py theme
Run Individual Test Classes
# Run specific integration test
.venv/bin/python -m pytest tests/test_integration.py::TestIntegrationSuite::test_theme_changing_functionality -v
# Run all theme manager tests
.venv/bin/python -m pytest tests/test_theme_manager.py -v
Migration Benefits
- Unified Structure: All tests use the same pytest framework
- Better Organization: Related tests grouped together
- Improved Coverage: Integrated coverage reporting
- Faster Execution: Optimized test setup and teardown
- Better CI/CD: Easier to integrate with automated testing
Backwards Compatibility
The old integration_test.py script is still available and called by the new test runner for backwards compatibility.