mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
When printing an unraisable error, don't print exceptions. before the name.
This duplicates the behavior whening normally printing exceptions.
This commit is contained in:
parent
a892554781
commit
88516a6039
3 changed files with 7 additions and 3 deletions
|
@ -1681,7 +1681,7 @@ Our ill-behaved code should be invoked during GC:
|
|||
>>> g.next()
|
||||
>>> del g
|
||||
>>> sys.stderr.getvalue().startswith(
|
||||
... "Exception exceptions.RuntimeError: 'generator ignored GeneratorExit' in "
|
||||
... "Exception RuntimeError: 'generator ignored GeneratorExit' in "
|
||||
... )
|
||||
True
|
||||
>>> sys.stderr = old
|
||||
|
@ -1798,7 +1798,7 @@ to test.
|
|||
... del l
|
||||
... err = sys.stderr.getvalue().strip()
|
||||
... err.startswith(
|
||||
... "Exception exceptions.RuntimeError: RuntimeError() in <"
|
||||
... "Exception RuntimeError: RuntimeError() in <"
|
||||
... )
|
||||
... err.endswith("> ignored")
|
||||
... len(err.splitlines())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue