MuMoT icon indicating copy to clipboard operation
MuMoT copied to clipboard

Do not suppress tracebacks when running 'test' notebooks via nbval

Open willfurnass opened this issue 5 years ago • 3 comments

At present tracebacks are suppressed via the logic in init.py. This is annoying when pytest fails.

A possible solution: if there is an active IPython session then only suppress tracebacks if an env var is defined and set to 1. This env var could then be set to 1 in tox.ini

willfurnass avatar Feb 10 '20 18:02 willfurnass

I think this is setVerbose()? Add this to test notebooks if it's not there already?

jarmarshall avatar Feb 10 '20 18:02 jarmarshall

It's the user manual Notebook that this would be most useful for as it's the first Notebook to be run by tox but I presume you don't want setVerbose(True) added to that Notebook.

willfurnass avatar Feb 10 '20 18:02 willfurnass

OK - maybe run it last? It's good to test the user manual of course, but most of the functionality should have been tested if the other notebooks complete...

jarmarshall avatar Feb 10 '20 19:02 jarmarshall