Testing nbtoolbelt
nbtoolbelt comes with automated test cases using pytest and pytest-mock.
For the purpose of testing,
the command-line script nbtb has a hidden command base.
This command invokes the base class Tool (also see Adding Tools to nbtoolbelt),
which copies notebooks:
notebook
nb.ipynbis copied tonb-copy.ipynb
$ nbtb base test.ipynb
Copying: test.ipynb
Test cases for concrete tools need not test functionality of the base class.