mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +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:
|
else:
|
||||||
cfp = cStringIO.StringIO()
|
cfp = cStringIO.StringIO()
|
||||||
if huntrleaks:
|
if huntrleaks:
|
||||||
|
if not hasattr(sys, 'gettotalrefcount'):
|
||||||
|
raise Exception("Tracking reference leaks requires a debug build "
|
||||||
|
"of Python")
|
||||||
refrep = open(huntrleaks[2], "a")
|
refrep = open(huntrleaks[2], "a")
|
||||||
try:
|
try:
|
||||||
save_stdout = sys.stdout
|
save_stdout = sys.stdout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue