I am working on a presentation on python testing options, and one of the technologies that I want to use for demonstration is pytest. I plan to make a presentation from a jupyter / ipython laptop. Ideally, I would like to be able to define a test function in a cell, and then use pytest to run that particular function; this way I can demonstrate the individual features of pytest, etc.
Is there an existing way to do this? None of the interactive features that I saw in the pytest api seem to match the bill, but I'm certainly not a testing specialist. I would be happy to write a plugin to do this, so any advice on a better approach in this direction would be great.
I saw pytest-ipynb but it doesn't seem to do what I need. If this estimate is incorrect, tips on how to use it will also be useful.
abingham
source share