Problem
Test files independently recreate sample configs, corpus records, model responses, and evaluation results. This leads to duplication and inconsistency — a schema change requires updates in multiple test files.
Proposal
Create/extend tests/conftest.py with shared fixtures:
sample_config — a minimal valid DriftcutConfig
sample_corpus — a list of 5-10 PromptRecord covering all criticality/output type combinations
sample_model_response — a ModelResponse factory
sample_evaluation — a PromptEvaluation factory
Keep test-specific data local, move repeated structures to fixtures.
Impact
- Less duplication across 14 test files
- Easier to update when models/config schema changes
- Lower barrier for writing new tests
Problem
Test files independently recreate sample configs, corpus records, model responses, and evaluation results. This leads to duplication and inconsistency — a schema change requires updates in multiple test files.
Proposal
Create/extend
tests/conftest.pywith shared fixtures:sample_config— a minimal validDriftcutConfigsample_corpus— a list of 5-10PromptRecordcovering all criticality/output type combinationssample_model_response— aModelResponsefactorysample_evaluation— aPromptEvaluationfactoryKeep test-specific data local, move repeated structures to fixtures.
Impact