jupyter_kernel_test is a tool for testing Jupyter kernels. It tests kernels
for successful code execution and conformance with the Jupyter Messaging Protocol
(currently 5.0).
Install
Install it with pip (python3.4 or greater required):
pip3 install jupyter_kernel_test
Usage
To use it, you need to write a (python) unittest file containing code
samples in the relevant language which test various parts of the messaging protocol.
A short example is given below, and you can also refer to the
test_ipykernel.py and test_irkernel.py files for complete examples.
Some parts of the messaging protocol are relevant only to the browser-based
notebook (rich display) or console interfaces (code completeness,
history searching). Only parts of the spec for which you provide code samples
are tested.
Run this file directly using python, or use nosetests or py.test to find
and run it.
Example
import unittest
import jupyter_kernel_test
class MyKernelTests(jupyter_kernel_test.KernelTests):
|