Run doctests in individual IPython Notebook cells
Lets you run the doctests of a single class or function at a time. Useful for tutorials based on the IPython Notebook, using doctests for student feeback.
Install with pip install ipython_doctester, or navigate to this directory and run:
python setup.py install
Run ipython notebook, then start your notebook with this import:
In : from ipython_doctester import test
In each subsequent cell, set up objects with their doctests, and with absent (or flawed) function bodies, and decorate them with @test.
- In : @test
- def square(x):
- ‘’’ >>> f(2) 4 ‘’’
Tests will run on each cell as it is executed.
Brian Granger for technical advice
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ipython_doctester-0.1.1.tar.gz (2.7 kB)||File type Source||Python version None||Upload date||Hashes View|
|Filename, size ipython_doctester-0.1.1-py2.7.egg (5.4 kB)||File type Egg||Python version 2.7||Upload date||Hashes View|
Hashes for ipython_doctester-0.1.1-py2.7.egg