How I auto-refactored GDAL's test suite
summary
Uses Bowler to run syntax-aware refactors across GDAL's ~370k-line Python test suite, converting bespoke return-value tests into pytest fixtures and assertions, removing temp-file cleanup boilerplate, eliminating diagnostic prints, and renaming functions to test_. Automated changes remove ~9,000 lines* of dead code. A script recreates and rebases automated commits to avoid conflicts while the repo sees 10–20 commits per day, and the work lands via small, incremental PRs after mailing-list review.
AI-written summary · about
chapters (3)
related talks
28mHow I migrated a huge OSS project to use pytest
35mQuickly and Safely Refactoring Legacy Code
34mData-Driven Refactoring
43mFrom 0% to Cleanly Refactored 100% tested code
30mAutomating Code Quality
29mAdopt-a-pytest
01h 44mTUTORIAL: Refactoring without a net
38mTesting for the Terrified: How to Write Tests, Conquer Guilt, and Level Up
