~/talk

Developing With Doctests - Using Xdoctest As A Backend

Talkat PyCon US 2020 · 2020-04-15..04-23· [testing, python]
slides:none on file

Doctests get a practical overhaul: Xdoctest replaces regex parsing with an AST-based parser, accepts a single >>> rule for all statements, adds pytest integration and directives like requires/skip/ignore-want, and can target files, modules or whole packages while printing colored, reproducible failure commands. It trades a bit of speed and perfect backward compatibility for smoother running; it powers ubelt to 100% test coverage and shows odd metrics (34 GitHub stars vs ~3.4k monthly downloads).

AI-written summary · about

  1. 0:00Intro
  2. 0:53What Are Doctests?
  3. 1:51What Can Doctests Do?
  4. 3:44How To Write A Doctest
  5. 6:14Fixing Case Study #1
  6. 7:55Debugging
  7. 8:31Fixing Case Study #2
  8. 9:16Why Aren't Doctests Everywhere?
  9. 10:10The Xdoctest Module
  10. 11:10A Quick Aside On Formal Languages
  11. 12:14Theory And Practice
  12. 13:49Revisit Case Study #1
  13. 15:56Xdoctest Is Easier To Run
  14. 16:54Xdoctest Has Better Output
  15. 17:35Xdoctest Has Better Directives
  16. 20:14Xdoctest Has A Pytest Plugin
  17. 20:43When Your Doctests Work
  18. 21:13When Your Doctests Fail
  19. 22:27Miscellaneous Features
  20. 23:45Limitations
  21. 24:42Doctest Versus Xdoctest
  22. 26:03Contribution
  23. 26:52Summary And Conclusion
~/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.