summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2006-05-28 22:07:08 (GMT)
committerArmin Rigo <arigo@tunes.org>2006-05-28 22:07:08 (GMT)
commita6123abb72431f0dda92044727b10177c75a02eb (patch)
treeb14bd24100ed1273539fae82347115c5e4322d7f
parent5f6861df9300f455d600b6cd237faf429d9a06b0 (diff)
downloadcpython-a6123abb72431f0dda92044727b10177c75a02eb.zip
cpython-a6123abb72431f0dda92044727b10177c75a02eb.tar.gz
cpython-a6123abb72431f0dda92044727b10177c75a02eb.tar.bz2
A clearer error message when passing -R to regrtest.py with
release builds of Python.
-rwxr-xr-xLib/test/regrtest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 86961b0..314e7e1 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -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