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.

Filename, size & hash SHA256 hash help File type Python version Upload date
nbtester-0.3-py3-none-any.whl (2.7 kB) Copy SHA256 hash SHA256 Wheel 3.6 Aug 9, 2018
nbtester-0.3.tar.gz (2.1 kB) Copy SHA256 hash SHA256 Source None Aug 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page