numfocus / YouTubeVideoTimestamps

Adding timestamps to NumFOCUS and PyData YouTube videos!
https://www.youtube.com/c/PyDataTV
MIT License
79 stars 19 forks source link

Unit Testing for Data Scientists - Hanna Torrence #175

Open rudolphm opened 1 year ago

rudolphm commented 1 year ago

video url: https://www.youtube.com/watch?v=TPKgpzm4LZ8

Contents

0:00 - Introduction 1:08 - What is unit testing 2:06 - Benefits of unit testing 3:28 - So why doesn't everyone write unit tests? 5:26 - Patterns in Data Science 6:15 - Where to start 9:08 - How do we actually write tests. Introduction to Pytest Framework 10:03 - First unit test example 12:08 - Fixtures. Modular approach to setup and teardown methods 16:08 - Useful built-in fixtures, capsys 18:12 - Flexibility of fixtures 22:12 - Mocks 24:25 - Test with Mock 26:35 - Mock objects 29:29 - MagicMock objects in the REPL 30:05 - Actions taken by mock object 31:01 - Mock object side effect method 33:54 - Assertions on mock objects 35:24 - Be wary of assertion typos 36:49 - Gotchas for mocks 38:37 - Helpful libraries 38:44 - Useful blog posts 38:55 - Link to github repository + Conclusion