Debugging Failing Pytest Tests in a Notebook [PyOhio 2023]
YouTube Viewers YouTube Viewers
16.2K subscribers
26 views
0

 Published On Dec 17, 2023

Talk by Richard Shadrach at PyOhio 2023:
This talk describes how to use the `pytest-ndb` package for debugging failed pytest tests using a notebook.

In our opinion, developers should often prefer to debug failing tests using a debugger such as pdb. However for certain applications, such as those that occur in data science with large complex data sets or long running models, this is can be quite difficult. Debugging a failing test can mean having to analyze data, for which there is little support in a debugger and where notebooks truly shine.

Traditionally to debug in a notebook, all of the code from the test, including fixtures and parametrizations, must be copied. For simple tests this might not be an issue, but for a complex test it can be quite time consuming. Instead, you can use `pytest-ndb`!

PyOhio talk listing: https://www.pyohio.org/2023/talks/deb...

show more

Share/Embed