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 that something raises an error.
It is a bit tideous to have to try/catch this error to prevent mkdocs-gallery to fail.
It would be much better to be able to say that we expect it:
"""Example=======The following code raises an error"""# mkdocs_gallery_expected_error1+"hello"# %%# But this works:1*"hello"
We could maybe have a mkdocs_gallery_expected_error similar to the mkdocs_gallery_defer_figures configuration.
It could even accept an optional argument (the exception type, as in pytest.raises)
Of course as always let's first ask the sphinx-gallery team to keep aligned.
Sometimes we write a code block to show that something raises an error.
It is a bit tideous to have to try/catch this error to prevent mkdocs-gallery to fail.
It would be much better to be able to say that we expect it:
We could maybe have a
mkdocs_gallery_expected_error
similar to themkdocs_gallery_defer_figures
configuration.It could even accept an optional argument (the exception type, as in
pytest.raises
)Of course as always let's first ask the sphinx-gallery team to keep aligned.
Existing code-block options are listed at the bottom of https://sphinx-gallery.github.io/stable/configuration.html?highlight=sphinx_gallery_#list-of-config-options
See also https://sphinx-gallery.github.io/stable/configuration.html#dont-fail-exit which is related but does not fit the same purpose.
The text was updated successfully, but these errors were encountered: