API References

Classes

class testmynb.handler.TestHandler(*notebooks)
class testmynb.notebook.TestCell(data, notebook)

Bases: collections.UserString

A class for Jupyter Notebook code cell.

Variables
  • ignore (bool) – Whether the cell magic line contained the -t option.

  • name (str) – The user defined name of the test cell block.

class testmynb.notebook.Notebook(ipynb: TextIO)

Bases: nbformat.notebooknode.NotebookNode

A class used to read the Jupyter Notebook

Parameters

ipynb (TextIO) – Path to the .ipynb file.

Variables
  • ipynb (TextIO) – Absolute path to the .ipynb file that was given to instantiate the instance.

  • name (str) – Name of the .ipynb file.

  • trusted (bool) – Whether the Notebook is Trusted or not for the user.

  • nbformat (str) – The Jupyter Notebook format number.

extract_codes()

Returns a list of code cells with the %%testcell cell magic.

Functions

testmynb.handler.find_notebooks(*args)