testbook 0.2.4
pip install testbook==0.2.4
Released:
A unit testing framework for Jupyter Notebooks
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD)
- Author: nteract contributors
- Tags jupyter, mapreduce, nteract, pipeline, notebook
- Requires: Python >=3.6
Classifiers
- Intended Audience
- License
- Programming Language
Project description
testbook
testbook is a unit testing framework extension for testing code in Jupyter Notebooks.
Previous attempts at unit testing notebooks involved writing the tests in the notebook itself. However, testbook will allow for unit tests to be run against notebooks in separate test files, hence treating .ipynb files as .py files.
testbook helps you set up conventional unit tests for your Jupyter Notebooks.
Here is an example of a unit test written using testbook
Consider the following code cell in a Jupyter Notebook:
def func(a, b):
return a + b
You would write a unit test using testbook
in a Python file as follows:
import testbook
@testbook.testbook('/path/to/notebook.ipynb', execute=True)
def test_func(tb):
func = tb.ref("func")
assert func(1, 2) == 3
Installing testbook
pip install testbook
Documentation
See readthedocs for more in-depth details.
Development Guide
Read CONTRIBUTING.md for guidelines on how to setup a local development environment and make code changes back to testbook.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD)
- Author: nteract contributors
- Tags jupyter, mapreduce, nteract, pipeline, notebook
- Requires: Python >=3.6
Classifiers
- Intended Audience
- License
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file testbook-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: testbook-0.2.4-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e21d5118cfb96a13ab2677234588c6c860ce3ee998e0fb4cfced5fedbb8ccc |
|
MD5 | 30c76b5ed2d51109cda91a9654c7206c |
|
BLAKE2b-256 | 705b4af8df69c6f0a1f0b69099cc5aa0e8f0ae0e56d8a3aa29d89b43619c678f |