development_docs/testing.md
snapshots/ directory next to your test filefixtures/ directory next to your test filetests/_convert/ipynb/
├── test_ipynb_converter.py
├── snapshots/ # Expected outputs
└── fixtures/ # Test inputs
from tests.mocks import snapshotter
snapshot = snapshotter(__file__)
snapshot("output.py.txt", result) # Auto-creates/compares snapshot
Available in tests/conftest.py:
k - Default kernel (autorun, relaxed)strict_kernel - Strict execution modelazy_kernel - Lazy execution moderun_mode_kernel - RUN mode (not EDIT)mocked_kernel - Full MockedKernel wrapperexecuting_kernel - Execution context installedany_kernel - Parametrized: runs test 3x (k, strict, lazy)execution_kernel - Parametrized: runs test 2x (k, strict)uv run --python 3.12 --group test pytest tests/path/to/test.py
uv run --python 3.12 --group test-optional pytest tests/path/to/test.py # with optional deps