Commit 1bddfb84 authored by Tim Peters's avatar Tim Peters

test_struct grew weird behavior under regrtest.py -R,

due to a module-level cache.  Clearing the cache should
make it stop showing up in refleak reports.
parent 77633518
......@@ -545,6 +545,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
def cleanup():
import _strptime, linecache, warnings, dircache
import urlparse, urllib, urllib2, mimetypes, doctest
import struct
from distutils.dir_util import _path_created
_path_created.clear()
warnings.filters[:] = fs
......@@ -561,6 +562,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
dircache.reset()
linecache.clearcache()
mimetypes._default_mime_types()
struct._cache.clear()
doctest.master = None
if indirect_test:
def run_the_test():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment