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
fromcleo.io.buffered_ioimportBufferedIOfromcleo.ui.exception_traceimportExceptionTracefromcrashtest.inspectorimportInspectorif__name__=="__main__":
io=BufferedIO()
try:
try:
raiseValueError("ValueError")
exceptValueError:
raiseRuntimeError("RuntimeError") fromNoneexceptExceptionase:
# assert the conditionasserte.__context__isnotNoneasserte.__suppress_context__# this is the high level impactExceptionTrace(e).render(io)
# this is the root causeassertnotInspector(e).has_previous_exception()
finally:
output=io.fetch_output()
print(output)
# if __suppress_context__ is respected this should not be displayedassert"The following error occurred when trying to handle this error:"notinoutput
The text was updated successfully, but these errors were encountered:
abn
changed the title
When rendering exceptions __suppress_context__ is not respected
When rendering exceptions, __suppress_context__ is not respected
Nov 25, 2024
Originally identified in python-poetry/poetry#9870.
The text was updated successfully, but these errors were encountered: