mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
A clearer error message when passing -R to regrtest.py with
release builds of Python.
This commit is contained in:
parent
5f6861df93
commit
a6123abb72
1 changed files with 3 additions and 0 deletions
|
@ -513,6 +513,9 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
|
|||
else:
|
||||
cfp = cStringIO.StringIO()
|
||||
if huntrleaks:
|
||||
if not hasattr(sys, 'gettotalrefcount'):
|
||||
raise Exception("Tracking reference leaks requires a debug build "
|
||||
"of Python")
|
||||
refrep = open(huntrleaks[2], "a")
|
||||
try:
|
||||
save_stdout = sys.stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue