News for hackers. Stuff that matters.
Re:Jupyter Notebooks as E2E Tests by udioron on Wednesday December 18, 2024 @04:28AM (#42449154)
Very cool! One can write a pytest plugin that executes notebooks from a folder with custom pytest fixtures support.
Re:Jupyter Notebooks as E2E Tests by japanuspus on Wednesday December 18, 2024 @05:30AM (#42449427)
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/