From 1bddfb84ee8e5a67af9a5001ab845c22c29cd491 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Tue, 23 May 2006 21:51:35 +0000 Subject: [PATCH] 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. --- Lib/test/regrtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ce9ed2245e9..86961b08aac 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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():