How to run tests (answers user question):
Manual execution:
./run_tests.sh # Quick way with auto-configured python
python -m pytest tests/unit/ -v # Direct pytest command
Automated (Gitea Actions):
- Tests run on every push/PR to main branch
- Workflow file: .gitea/workflows/test.yml
- Status visible at repo actions page
CI skips PySide6-dependent GUI tests by default.
Addresses audit findings A001, T002:
A001 - Undefined Plugin Interface:
- Created src/plugins/interface.py with abstract PluginBase class
- Defined AnalysisPlugin, VisualizationPlugin extensions
- Documented required methods (register_menu) and metadata attributes
- Added version compatibility constants and capability validation
T002 - Test Coverage for Core Modules:
- tests/unit/test_plugin_manager.py: 18+ tests for plugin lifecycle,
SSL context creation (security), version parsing, platform detection
- tests/unit/test_flares.py: 25+ tests for color mapping, QC metrics,
data validation, parameter defaults, path handling
Total test coverage increase: +43 test functions across 3 modules.
- Add shlex.quote() on all path arguments before subprocess calls (lines 404-407)
- Consolidate duplicated version_compare() function into single module-level utility
- Remove three identical class methods from UpdateCheckThread, LocalPendingUpdateCheckThread, and UpdateManager
- Add comprehensive test suite for updater.py security-critical functionality
- Add requirements-dev.txt with pytest dependency
Addresses critical security findings from flares_audit_report.md:
S001: Command Injection in Updater (CVSS ~7.5)
Q001: Duplicated version_compare logic
T001: Insufficient test coverage for updater.py