~/talk

Delete all code! 100% testing coverage, the lazy way!

Talkat !!Con West 2020 · 2020-02-29..03-01· [testing, python]
links:none on file
slides:none on file

Claims a hack that will delete untested branches to give a codebase 100% coverage; builds a Python tool called magikov (GPL) that performs source-to-source edits via AST manipulation and the Google pasta library. Starts from ~46% coverage, raises it to 86% during development and to 100% after running the tool. Encounters and fixes real problems: side effects in if tests, yield turning functions into generators, and a bug in coverage.py that initially breaks deleted lines.

AI-written summary · about

  1. 0:00Intro
  2. 0:55What is testing coverage
  3. 2:16Example
  4. 2:48Source code transformation
  5. 3:24ASTs
  6. 4:00Python Standard Library
  7. 5:03Pasta
  8. 5:41Magikov
  9. 7:24Demo
  10. 10:11Conclusion
~/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.