Hacker News new | ask | show | jobs
by udioron 541 days ago
Very cool! One can write a pytest plugin that executes notebooks from a folder with custom pytest fixtures support.
1 comments

You don't even need a plugin: I have been using a setup with parametrized tests and `runpy` for a while [0]. Works especially well if you use jupytext[1] for just storing the input part of the notebook as a python script -- which is good for version control sanity in any case.

[0]: https://stackoverflow.com/a/56813896/212538 [1]: https://jupytext.readthedocs.io/en/latest/