diff options
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 3 |
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 |