Skip to content

Commit ea0334c

Browse files
author
tim.peters
committed
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). git-svn-id: http://svn.python.org/projects/python/trunk@45371 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 06ed859 commit ea0334c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/test/regrtest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
520520
import gc
521521
def cleanup():
522522
import _strptime, linecache, warnings, dircache
523-
import urlparse, urllib, urllib2, mimetypes
523+
import urlparse, urllib, urllib2, mimetypes, doctest
524524
from distutils.dir_util import _path_created
525525
_path_created.clear()
526526
warnings.filters[:] = fs
@@ -537,6 +537,7 @@ def cleanup():
537537
dircache.reset()
538538
linecache.clearcache()
539539
mimetypes._default_mime_types()
540+
doctest.master = None
540541
if indirect_test:
541542
def run_the_test():
542543
indirect_test()
@@ -548,6 +549,7 @@ def run_the_test():
548549
print >> sys.stderr, "beginning", repcount, "repetitions"
549550
print >> sys.stderr, \
550551
("1234567890"*(repcount//10 + 1))[:repcount]
552+
cleanup()
551553
for i in range(repcount):
552554
rc = sys.gettotalrefcount()
553555
run_the_test()

0 commit comments

Comments
 (0)