~/talk

Python Testing Fundamentals

Talkat PyOhio 2012 · 2012-07-28..07-29· [testing]
links:none on file
slides:none on file

Covers concrete examples: assert statements as reality checks (shows BigBiz bottom_line/growth returning -1,000,000, triggering AssertionError) and that assertions disable with the -O switch; demonstrates unittest: subclassing TestCase, setUp/tearDown, TestSuite selection and discovery, running tests via setup.py; shows doctest examples (Fibonacci and triangular functions, tests for <100 and <10), and converting doctests into unit tests with doctest.DocTestSuite; all demo tests run and pass (4 tests, 0 failures) on Python 3.2.3.

AI-written summary · about

  1. 0:00Introduction to testing
  2. 3:50Why you should test
  3. 5:54Using assert statements
  4. 10:15Practical assertion examples
  5. 14:58Disabling assertions
  6. 18:18Unit test fundamentals
  7. 22:47Writing test cases
  8. 25:28Test fixtures and suites
  9. 50:29Advanced test suites
  10. 56:12Test discovery and setup
  11. 1:07:36Introduction to doc tests
  12. 1:09:25Running doc tests
  13. 1:15:38Integrating doc and unit tests
  14. 1:20:22Test driven development
~/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.