-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad magic unexpectedly passes #147
Comments
Replacing
|
For the "bad magic", you get a Lines 149 to 164 in 3597e0b
(You can see that message in kernelspy in the screenshot above.) Here, Meanwhile, in Lines 586 to 718 in 3597e0b
Here, only messages of type So, no error is detected for bad magics. (Not sure if there could be other things that are missed too.) This is in contrast to e.g. a regular python exception, which results in an iopub message of type I'm not sure what the solution should be. E.g. I don't know if it's safe to be checking only iopub messages for errors, or if something else in the stack should be sending an iopub error message for bad magics (just like for a regular python execution failure). |
If I create a new notebook
nb.ipynb
with two cells:In[1]:
In[2]:
I would expect
python -m pytest -v --nbval-lax nb.ipynb
to fail, but it passes.In jupyter lab, "run all" stops execution at the first cell and reports
UsageError: Line magic function '%notmagic' not found
I'm replacing an existing "notebook checking tool" with nbval; that tool (based on nbconvert) also correctly reports the same failure.
The text was updated successfully, but these errors were encountered: