Spaces:
Sleeping
Sleeping
File size: 1,076 Bytes
22a6915 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # tests
Automated test suite managed by pytest with coverage tracking.
## Running
```bash
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.yaml` and `ui/pipeline.py`
- Pipeline classes produce valid focus scores in [0, 1]
- Model outputs have correct dimensions for batch inference
|