summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-04-13 23:12:24 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-04-13 23:12:24 (GMT)
commit7db4f2460f45c2d43477c5cf852abbb84b65deff (patch)
tree6852c33ce82237f2141a2674507fc4a7d58e4104 /Lib/test
parent8e6480ca02adb3cb790c0e12cef13cc41d2744e2 (diff)
downloadcpython-7db4f2460f45c2d43477c5cf852abbb84b65deff.zip
cpython-7db4f2460f45c2d43477c5cf852abbb84b65deff.tar.gz
cpython-7db4f2460f45c2d43477c5cf852abbb84b65deff.tar.bz2
When using -R, lots of "*** DocTestRunner.merge:" nuisance messages
appear. Get rid of them by nuking doctest's default DocTestRunner instance as part of cleanup(). Also cleanup() before running the first test repetition (the test was run once before we get into the -R branch).
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/regrtest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 224a2a0..566e54b 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -520,7 +520,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
import gc
def cleanup():
import _strptime, linecache, warnings, dircache
- import urlparse, urllib, urllib2, mimetypes
+ import urlparse, urllib, urllib2, mimetypes, doctest
from distutils.dir_util import _path_created
_path_created.clear()
warnings.filters[:] = fs
@@ -537,6 +537,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
dircache.reset()
linecache.clearcache()
mimetypes._default_mime_types()
+ doctest.master = None
if indirect_test:
def run_the_test():
indirect_test()
@@ -548,6 +549,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
print >> sys.stderr, "beginning", repcount, "repetitions"
print >> sys.stderr, \
("1234567890"*(repcount//10 + 1))[:repcount]
+ cleanup()
for i in range(repcount):
rc = sys.gettotalrefcount()
run_the_test()