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.8.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file nbtester-0.8.0.tar.gz.

File metadata

  • Download URL: nbtester-0.8.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for nbtester-0.8.0.tar.gz
Algorithm Hash digest
SHA256 dce67fc86bd596e2d4c3ec1b57082a3f797cf7caec7b130312ecdd6edd8bf03d
MD5 e6dda178207bd0d39a3dd36cefa17efb
BLAKE2b-256 a0c4c2301fcd2544fb2a88f5cd9391f6df1671c807b03c998dd34d726b263f1f

See more details on using hashes here.

Supported by

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