nbclient.tests package

Submodules

nbclient.tests.base module

class nbclient.tests.base.NBClientTestsBase(methodName='runTest')

Bases: TestCase

build_notebook(with_json_outputs=False)

Build a notebook in memory for use with NotebookClient tests

build_resources()

Build an empty resources dictionary.

classmethod merge_dicts(*dict_args)

nbclient.tests.fake_kernelmanager module

class nbclient.tests.fake_kernelmanager.FakeCustomKernelManager(**kwargs: Any)

Bases: AsyncKernelManager

client(*args, **kwargs)

Create a client configured to connect to our kernel

expected_methods = {'__init__': 0, 'client': 0, 'start_kernel': 0}
async start_kernel(*args, **kwargs)

Starts a kernel on this host in a separate process.

If random ports (port=0) are being used, this method must be called before the channels are created.

Parameters:

**kw (optional) – keyword arguments that are passed down to build the kernel_cmd and launching the kernel (e.g. Popen kwargs).

nbclient.tests.test_client module

Module contents