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.
Test Suite
This directory contains automated tests for the FLARES project.
Directory Structure
tests/
├── unit/ # Unit tests for individual modules
│ ├── test_updater.py # Security-critical updater module tests
│ └── ... (more tests TBD)
├── integration/ # Integration tests for multi-component workflows
└── fixtures/ # Test data and mock resources
Running Tests
# Install development dependencies
pip install -r requirements-dev.txt
# Run all unit tests
pytest tests/unit/ -v
# Run specific test file
pytest tests/unit/test_updater.py -v
# Run with coverage
pytest --cov=src tests/ -v
Test Coverage Goals
updater.py: 100% (security-critical)- Core modules: >80%
- Overall project: >60% (initial target)
Writing Tests
See existing tests in tests/unit/test_updater.py for examples of:
- Testing utility functions like
version_compare() - Mocking external dependencies (QThread, HTTP requests)
- Security-focused test cases