~/talk

Testing Strategies for Python

Talkat PyBay 2023 · on Sunday, 2023-10-08· [testing, python]
links:none on file
slides:none on file

Argues unit testing is the easiest quality win and demonstrates a small Flask "build-a-pug" app that calls OpenAI but never hits the real API by using unittest.mock.patch to return a fake image URL, exercises error handling with parameterized checks via subTest to avoid redundant cases, and runs and debugs tests inside VS Code python plugin. Shows assertEqual and assertRaises checking exact exception messages and points to working example code on GitHub.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:49Why testing matters
  3. 3:16Types of software testing
  4. 3:58Unit testing explained
  5. 6:46Basic unit test example
  6. 7:27Testing error handling
  7. 8:11Parameterization with subtest
  8. 9:33Mocking external APIs
  9. 11:00Running tests in VS Code
  10. 12:28Summary and resources
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.