Advanced Software Testing for Data Scientists
summary
Uses a Kickstarter dataset and a scikit-learn pipeline of transformers (category extraction, currency normalization to USD) and shows concrete bugs found by tests — notably a falsifying example where a double slash breaks splitting discovered with property-based inputs. Demonstrates unit testing with pytest, richer diagnostics via marbles, dataframe equality with pandas.testing.assert_frame_equal, coverage with pytest‑cov, Hypothesis strategies that generate JSON strings, and test doubles/mocking for flaky external services.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 9:58Functional vs non-functional
- 15:16Testing crucial for data scientists
- 22:25Purpose of automated testing
- 24:33Python testing tools overview
- 31:37Unit test and PI test writing
- 39:36Testing pandas dataframes
- 42:57Parameterized tests
- 48:21Best practices for tests
- 57:17Test coverage and CI
- 1:03:04Manual vs property-based
- 1:14:09Generating inputs with Hypothesis
- 1:25:39Handling dependencies with test doubles
- 1:29:10Conclusion
related talks
01h 29mAdv. Software Testing for Data Scientists
39mUnit Testing for Data Scientists
01h 28mTesting with Pytest for Data Science
44mUnit Testing Data with Marbles
01h 11mTest-Driven Data Analysis
27mPyTesting the Limits of Machine Learning
28mHow to not pull your hair out while providing data to the business
25mTesting Data Pipelines
