mirror of https://github.com/python/cpython
Hopefully this makes test_urllib2 have inconsistent leak results
This commit is contained in:
parent
a1f9b7f50f
commit
5102c4e385
|
@ -520,7 +520,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
|
||||||
import gc
|
import gc
|
||||||
def cleanup():
|
def cleanup():
|
||||||
import _strptime, linecache, warnings, dircache
|
import _strptime, linecache, warnings, dircache
|
||||||
import urlparse, urllib, urllib2
|
import urlparse, urllib, urllib2, mimetypes
|
||||||
from distutils.dir_util import _path_created
|
from distutils.dir_util import _path_created
|
||||||
_path_created.clear()
|
_path_created.clear()
|
||||||
warnings.filters[:] = fs
|
warnings.filters[:] = fs
|
||||||
|
@ -536,6 +536,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
|
||||||
sys.path_importer_cache.update(pic)
|
sys.path_importer_cache.update(pic)
|
||||||
dircache.reset()
|
dircache.reset()
|
||||||
linecache.clearcache()
|
linecache.clearcache()
|
||||||
|
mimetypes._default_mime_types()
|
||||||
if indirect_test:
|
if indirect_test:
|
||||||
def run_the_test():
|
def run_the_test():
|
||||||
indirect_test()
|
indirect_test()
|
||||||
|
|
|
@ -60,7 +60,7 @@ REFLOG="build/reflog.txt.out"
|
||||||
# Note: test_XXX (none currently) really leak, but are disabled
|
# Note: test_XXX (none currently) really leak, but are disabled
|
||||||
# so we don't send spam. Any test which really leaks should only
|
# so we don't send spam. Any test which really leaks should only
|
||||||
# be listed here if there are also test cases under Lib/test/leakers.
|
# be listed here if there are also test cases under Lib/test/leakers.
|
||||||
LEAKY_TESTS="test_(capi|cfgparser|charmapcodec|cmd_line|compiler|ctypes|filecmp|quopri|socket|threaded_import|threadedtempfile|threading|threading_local|urllib2)"
|
LEAKY_TESTS="test_(capi|cfgparser|charmapcodec|cmd_line|compiler|ctypes|filecmp|quopri|socket|threaded_import|threadedtempfile|threading|threading_local)"
|
||||||
|
|
||||||
# Change this flag to "yes" for old releases to only update/build the docs.
|
# Change this flag to "yes" for old releases to only update/build the docs.
|
||||||
BUILD_DISABLED="no"
|
BUILD_DISABLED="no"
|
||||||
|
|
Loading…
Reference in New Issue