nbmake
Pytest plugin for testing notebooks
Decision gist · record as of 2026-08-14
Yes, if you maintain Jupyter notebooks as part of documentation, teaching materials, or package examples and want to automate their execution in CI. The low install friction and tight pytest integration make it straightforward to add. The aging maintenance status (599 days since last release) is a minor concern but not a blocker—the project is active and has no known vulnerabilities. Not necessary if notebooks are only consumed as rendered HTML and never need to be re-executed.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.8.0 and an active Jupyter kernel (default 'python3' or custom kernel via --nbmake-kernel flag).
- Low friction install with a small, focused dependency tree (ipykernel, nbclient, nbformat, pygments, pytest).
- Last release was 599 days ago; the project is in aging maintenance but remains active with no archived status.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions.
last release 2024-12-23 (599 days) · last repo commit 2025-03-18 · 210 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 618,179 downloads/mo, #5,734 on PyPI
Alternatives
Verify before relying
pip install pytest nbmake
pytest --nbmake **/*.ipynb- Whether parallel execution with pytest-xdist is stable for large notebook suites in production CI environments.
- Performance characteristics when mocking or skipping cells in notebooks with hundreds of cells.
- Compatibility with recent versions of nbsphinx and jupyter-book beyond the documentation examples.
What it is and what it does
nbmake is a pytest plugin that treats Jupyter notebooks as executable test suites. It runs notebook cells sequentially using nbclient and the ipykernel, capturing output and failures just like pytest captures test results. You can configure cell timeouts, allow specific cells to raise exceptions, skip cells, mock variables mid-execution, and run post-cell assertions—all via notebook metadata. The plugin integrates with pytest's standard discovery and reporting, and supports parallel execution via pytest-xdist for faster CI runs.
The primary use case is maintaining documentation notebooks that must stay runnable and up-to-date. Research and ML engineers use it to ensure teaching materials and package examples don't break as dependencies evolve. It can optionally write executed notebooks back to disk, speeding up builds for documentation tools like jupyter-book and nbsphinx that consume the output. The tool assumes notebooks are primarily developed interactively but consumed as rendered docs, not as live notebooks.
Use it for
- Validate that all code examples in a package's documentation notebooks execute without errors in CI.
- Test ML training notebooks by mocking long-running cells and asserting outputs at checkpoints.
- Ensure teaching material notebooks run end-to-end with current package versions before release.
- Parallelize execution of a large repository of slow notebooks to reduce CI time.
- Find missing imports across a directory of partially-working notebooks without running them to completion.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain Jupyter notebooks as part of documentation, teaching materials, or package examples and want to automate their execution in CI.
The low install friction and tight pytest integration make it straightforward to add. The aging maintenance status (599 days since last release) is a minor concern but not a blocker—the project is active and has no known vulnerabilities. Not necessary if notebooks are only consumed as rendered HTML and never need to be re-executed.
Install
nbmake on PyPI
Before you install
Low friction install with a small, focused dependency tree (ipykernel, nbclient, nbformat, pygments, pytest). Last release was 599 days ago; the project is in aging maintenance but remains active with no archived status.
Requires Python >=3.8.0 and an active Jupyter kernel (default 'python3' or custom kernel via --nbmake-kernel flag).
License in practice
Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions.
Quickstart
pip install pytest nbmake
pytest --nbmake **/*.ipynb
Verify before relying
- Whether parallel execution with pytest-xdist is stable for large notebook suites in production CI environments.
- Performance characteristics when mocking or skipping cells in notebooks with hundreds of cells.
- Compatibility with recent versions of nbsphinx and jupyter-book beyond the documentation examples.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesipykernelnbclientnbformatpygmentspytest |
| Maintenance | Aging 599 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 618,179 / month, #5,734 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: nbmake-1.5.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “test jupyter notebooks”
- nbmakeA pytest plugin that executes Jupyter notebooks as tests, with…
- testbooktestbook lets you write unit tests for Jupyter Notebooks in separate…
- ipytestRuns pytest test suites directly in Jupyter notebooks with full…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also nbval · testbook · execnb · nbdev · jupyter-cache · nbclient · nbstripout · nb-clean · ipytest · jupyter-nbmodel-client