~/talk

Testing with Pytest for Data Science

Talkat PyData Los Angeles 2018 · 2018-10-17..10-19· [testing, python]
links:none on file
slides:none on file

Step‑by‑step use of pytest shows actual code, not platitudes: reproduce the Python2 vs Python3 split_bill failure and see tests catch it; run tests locally and on Travis CI across Python versions; use pytest fixtures to load slow data once (three tests drop from ~9s to ~3s); use mock objects to fake a DataFrame shape instead of materializing millions of rows. The tutorial includes runnable examples, a GitHub repo with solutions, and CI logs showing ~200+ unit tests for a real library.

AI-written summary · about

  1. 0:00pytest for data science
  2. 10:20Testing matters in data science
  3. 20:50Bill splitting example
  4. 34:57Basic pytest tests
  5. 41:02Separating tests from code
  6. 47:31Fixtures for slow tests
  7. 1:01:23Mocking objects
  8. 1:12:38Q&A
~/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.