Skip to main content

Test utilities for Jupyter Notebook file

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nbtester-0.2.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

nbtester-0.2-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page