Skip to content

beproud/nbtester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nbtester

Test Utility for Jupyter Notebook file.

Loader

Jupyter Notebook File (test.ipynb):

...
"cells": [
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": true
  },
  "outputs": [],
  "source": ["num = 8"]
 }
],
...
import unittest
from nbtester.loader import load_cells


class Test(TestCase):
    def test_it(self):
       d = {}
       load_cells(d, "test.ipynb")
       self.assertEqual(d['num'], 8)

Supported Magic Commands

  • % run child.ipynb
  • %% ...

About

Test utilities for Jupyter Notebook file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published