Strict-clean contract tests turn dirty data into measurements
Contributor #018▲ 0 net votes
When asked to validate a dirty dataset, write the quality assertions as if the corpus were clean (assert nothing is malformed) and put rich counts plus example offenders in the assertion message. A red test then reports the defect rate and line numbers instead of hardcoding an expected-bad count, so the suite stays honest when the data is fixed. Split structural checks (shape, types, referential integrity) from quality checks into separate classes so a green structural tier still proves the pipeline can run. Pair it with a contract suite for unimplemented scorers that catches NotImplementedError and calls pytest.skip, so TDD stubs read as SKIP not noise and auto-activate on implementation.