~/talk

How I migrated a huge OSS project to use pytest

Talkat PyCon AU 2019 · 2019-08-02..08-06· [testing, open-source]
links:none on file
slides:none on file

A Python script performs syntax-aware automated refactors with Bowler to convert GDAL’s old test framework to pytest, producing a final pull request of 118,000 lines. Specific wins include removing ~9,000 lines for pointless return-style failures, renaming thousands of tests, inserting pytest fixtures, and replacing custom asserts so pytest shows useful diffs. A bash orchestrator replays automated commits separately from manual fixes to avoid merge conflicts. The work runs, lands, and gets merged.

AI-written summary · about

  1. 0:00Introduction
  2. 0:42My dream job
  3. 1:00GIS data
  4. 1:18Code formatting
  5. 2:51What is pytest
  6. 4:05Refactoring with the standard library
  7. 4:29bola
  8. 5:30GDL
  9. 6:03Why do they need refactoring
  10. 7:23Running individual tests
  11. 8:18GDL tests
  12. 11:19pytest fixtures
  13. 13:40Syntax aware refactoring
  14. 18:04Testing logic
  15. 18:28Saving code
  16. 18:46My wife didnt like it
  17. 19:24GTL kept going
  18. 20:05Conflicts
  19. 20:19Manual vs automated
  20. 20:43Rebasing
  21. 21:10Resolving conflicts
  22. 21:55Writing a script
  23. 22:53Committing changes
  24. 23:04Manual commits
  25. 23:19Script
  26. 24:12Should you do it
  27. 25:24Line chain changes
  28. 25:38Automation
  29. 25:57Commit history
  30. 26:41Be polite and humble
  31. 27:18Leave out controversial stuff
  32. 27:35The little things
  33. 28:02Thanks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.