Spaces:
Sleeping
Sleeping
tests
Automated test suite managed by pytest with coverage tracking.
Running
pytest
pytest --cov # with coverage report
Coverage configuration is in .coveragerc.
Test files
| File | What it covers |
|---|---|
test_data_preparation.py |
Data loading, feature selection, stratified splits, scaler fitting, LOPO person dict construction |
test_models_clip_features.py |
Feature bounding: verifies clipping ranges for all 17 features match physiological limits (yaw +/-45, pitch +/-30, EAR [0, 0.85], MAR [0, 1.0]) |
test_pipeline_integration.py |
End-to-end ML pipeline: feature extraction through model inference, output shape validation, score range checks |
What is tested
- Data pipeline produces correct shapes and splits
- Feature selection returns exactly the 10 expected features
- StandardScaler is fit on training data only
- Clipping bounds match
config/default.yamlandui/pipeline.py - Pipeline classes produce valid focus scores in [0, 1]
- Model outputs have correct dimensions for batch inference