37 ms·
Very cool! One can write a pytest plugin that executes notebooks from a folder with custom pytest fixtures support.
by udioron 2y ago
Very cool!
One can write a pytest plugin that executes notebooks from a folder with custom pytest fixtures support.
- japanuspus 2y agoYou 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 https://stackoverflow.com/a/56813896/212538 [1]: https://jupytext.readthedocs.io/en/latest/ https://jupytext.readthedocs.io/en/latest/