References · Module 07¶
-
pytest documentation: Get started and fixtures. docs.pytest.org/en/stable/ Fixtures, parametrisation, and the assertion introspection that produces readable failures.
-
pytest documentation:
monkeypatchandtmp_path. docs.pytest.org/en/stable/how-to/monkeypatch.html For tests that need a temporary directory or a patched environment, without touching real files. -
pytest-cov documentation. pytest-cov.readthedocs.io
--cov-report=term-missingand theomitoption used to exclude stage entry points, if you choose to. -
pandera documentation. pandera.readthedocs.io Reused from Module 04 for data tests;
lazy=Trueis what makes a test report all failures. -
Breck, E. et al. (2017). The ML Test Score: A Rubric for ML Production Readiness and Technical Debt Reduction. Paper page A structured set of test categories for ML systems. Compare its categories with this module's five layers; the mapping is not one-to-one, and thinking about why is useful.
-
scikit-learn:
check_estimator. scikit-learn.org/stable/modules/generated/sklearn.utils.estimator_checks.check_estimator.html Only if you write custom transformers: a ready-made conformance suite that catches API mistakes you would not think to test. -
Hypothesis documentation. hypothesis.readthedocs.io Property-based testing. The extension in the lab uses it to generate inputs rather than examples; useful when the input space is large.
-
Google Testing Blog: Test Sizes. testing.googleblog.com/2010/12/test-sizes.html Small, medium, large tests and why the mix matters. A short read that explains why the suite in this module is deliberately small and fast.
Note on the numbers¶
The outputs in this module (25 tests, 53% coverage, MAE 5.048 against a 2.916 ceiling) come from the reference implementation on the course dataset. Your fixture and thresholds will differ; what should transfer is the gate's message format and the diagnosis of which test caught which bug.