mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Hopefully this makes test_urllib2 have inconsistent leak results
This commit is contained in:
parent
a1f9b7f50f
commit
5102c4e385
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
import urlparse, urllib, urllib2, mimetypes
|
||||
from distutils.dir_util import _path_created
|
||||
_path_created.clear()
|
||||
warnings.filters[:] = fs
|
||||
|
|
@ -536,6 +536,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
|
|||
sys.path_importer_cache.update(pic)
|
||||
dircache.reset()
|
||||
linecache.clearcache()
|
||||
mimetypes._default_mime_types()
|
||||
if indirect_test:
|
||||
def run_the_test():
|
||||
indirect_test()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue