You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we write a code block to show the reader that something raises an error.
It is a bit tideous to have to try/catch this error to prevent sphinx-gallery to fail with Unexpected failing examples.
Still, in this situation we do not as well want to fail the rest of the example, nor mark the whole file as expected to fail.
It would be much better to be able to say that we expect it at a block level:
"""Example=======The following code raises an error"""# sphinx_gallery_expected_error1+"hello"# %%# But this works:1*"hello"
We could maybe have a sphinx_gallery_expected_error similar to the sphinx_gallery_defer_figures configuration.
It could even accept an optional argument (the exception type, as in pytest.raises) to avoid being too tolerant.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
( From smarie/mkdocs-gallery#23 )
Sometimes we write a code block to show the reader that something raises an error.
It is a bit tideous to have to try/catch this error to prevent sphinx-gallery to fail with
Unexpected failing examples
.Still, in this situation we do not as well want to fail the rest of the example, nor mark the whole file as expected to fail.
It would be much better to be able to say that we expect it at a block level:
We could maybe have a
sphinx_gallery_expected_error
similar to thesphinx_gallery_defer_figures
configuration.It could even accept an optional argument (the exception type, as in
pytest.raises
) to avoid being too tolerant.The text was updated successfully, but these errors were encountered: