title: Running pytest test functions inside a jupyter notebook
body: <p>I'm working on a presentation about python testing options, and one of the technologies I want to demo is pytest. I'm planning to do the presentation from an jupyter/ipython notebook. Ideally I'd like to be able to define a test function in a cell and then use pytest to run just that function; that way I can demonstrate individual features of pytest, etc.</p>
  
  <p>Is there an existing way to do this? None of the interactive features I saw in the pytest api seem to fit the bill, but I'm certainly no pytest expert. I'd be happy to write a plugin to do it, so any advice on the best approach in that direction would be great. </p>
  
  <p>I did see pytest-ipynb, but it does not seem to do what I need. If that assessment is wrong, advice on how to use that would be great, too.</p>