Calmcode - jupyter lab: testing notebooks

Testing Notebooks

1 2 3 4 5 6

Be sure to install the dependencies first. You can do this from the terminal but be sure that you're in the correct virtual environment.

pip install pytest nbval

The commands that were used in this video are listed below.

Base Starter

pytest --nbval demo.ipynb

If you want to disable the warnings

pytest --nbval --disable-warnings demo.ipynb

If you don't care about cell outputs

pytest --nbval-lax --disable-warnings demo.ipynb

If you want the command line tool to ignore a cell simply add this comment to it;