Skip to content

Add pytest test suite and CI test runner#102

Open
midaa1 wants to merge 1 commit intoruxailab:mainfrom
midaa1:add-tests
Open

Add pytest test suite and CI test runner#102
midaa1 wants to merge 1 commit intoruxailab:mainfrom
midaa1:add-tests

Conversation

@midaa1
Copy link
Copy Markdown
Contributor

@midaa1 midaa1 commented Apr 5, 2026

Summary

  • Added a pytest test suite with 47 tests covering unit, integration, and API layers
  • Updated the CI pipeline to install dependencies, set up Python 3.11, and run pytest -v on every PR

What's tested

File What it covers
test_metrics.py Precision, accuracy, and Euclidean distance metric functions
test_gaze_tracker.py squash, normalizeData, model registry, trian_and_predict, predict,
predict_new_data_simple
test_session_model.py Session model creation, to_dict serialization
test_routes.py /health, /calib_validation, /batch_predict endpoints (success, error, method rejection)
test_config.py Hyperparameter grid structure and values
test_nan_conversion.py NaN/Inf → None conversion for JSON serialization (floats, numpy types, nested structures)

Changes

  • tests/ — new test suite (conftest + 6 test modules)
  • pytest.ini — pytest configuration
  • .github/workflows/main.yml — CI now runs pytest -v instead of checkout-only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant