mirror of https://github.com/python/cpython
doctest systematically leaked memory when handling an exception in an
example (an obvious trackback cycle). Repaired. Bugfix candidate.
This commit is contained in:
parent
b2bc6a93df
commit
77f2d504c3
|
@ -500,7 +500,7 @@ def _run_examples_inner(out, fakeout, examples, globs, verbose, name):
|
|||
# Only compare exception type and value - the rest of
|
||||
# the traceback isn't necessary.
|
||||
want = want.split('\n')[-2] + '\n'
|
||||
exc_type, exc_val, exc_tb = sys.exc_info()
|
||||
exc_type, exc_val = sys.exc_info()[:2]
|
||||
got = traceback.format_exception_only(exc_type, exc_val)[-1]
|
||||
state = OK
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue