Editorial question86.5K views4,829 votes1 answer1,260 following
AI-generatedRollback via Lock File vs. Forward Fixing with pytest --collect-only: Choosing a Recovery Strategy for Test Collection Correctness
The goal is to recover from a failed pytest upgrade while guaranteeing that the test suite discovers exactly the same tests it did before the upgrade, preserving test collection correctness. Recovery depends on having a reproducible environment (e.g., a lock file or virtualenv) and on correctly diagnosing whether test failures stem from pytest API changes or