Closed aakashns closed 3 years ago
I think right now the error is:
testbook.exceptions.TestbookExecuteResultNotFoundError: code provided does not produce execute_result
which is a bit confusing (I didn't realize that this error was thrown when I was trying to access a variable that did not exit)
That is not the expected behaviour - It should ideally throw a TestbookRuntimeError
which contains an attribute called eclass
containing the actual error class raised in the notebook. For example, in the case of a variable/function not being found, e.class
would be NameError
.
Can you please provide some more context?
Also, it would be nice if the following check is supported: 'happy_fraction' in tb
Sure, will create an issue for that right away :)
When I try:
And the name
happy_fraction
is not defined, it would be useful to raise an error with the message'happy_fraction' is not defined in the notebook
On the other hand:
can return
None
(similar to how.get
works for dictionaries)Also, it would be nice if the following check is supported: