Testing and Debugging Jupyter Notebooks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I'm not claiming the following is minimal or Pythonic, but I can say that it does what I wanted to have happen in my Jupyter notebook:
testSuite = unittest.TestLoader().loadTestsFromName("__main__.TestNotebook")
testRunner = unittest.TextTestRunner(verbosity=2)
testRunner.run(testSuite)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very helpful. I'm also looking around for the goop that would only execute the tests for the class TestNotebook. There might be others discovered from elsewhere that we don't want to execute in the present cell.