ipytest provides utilities for running unit tests inside IPython notebooks, allowing inline test definition and execution with pytest. Current version: 0.14.2, requires Python >=3.8 and <4. Releases are infrequent.
pip install ipytestVerified import paths — ran on the pinned version, not inferred.
After importing ipytest, call autoconfig() to configure pytest for notebook. Define tests as functions starting with 'test_', then run them with ipytest.run().
Always import ipytest at the top of your notebook cell before defining test functions.
Use ipytest.autoconfig() without arguments. Do not pass config paths.
Use ipytest.run() instead of the cell magic.
Define tests directly in a notebook cell and execute that cell to register them.
Run `pip install ipytest` and ensure you are using the same kernel as the installation.
Use ipytest.run() instead of the cell magic. Or load the magics with `%load_ext ipytest.magics` (deprecated).
Remove arguments: just call `ipytest.autoconfig()` without any parameters.
Check that your test function names start with 'test_' and that you have defined them before invoking ipytest.run().