[Python-checkins] r46156 - python/trunk/Lib/test/regrtest.py

tim.peters python-checkins at python.org
Tue May 23 23:51:36 CEST 2006


Author: tim.peters
Date: Tue May 23 23:51:35 2006
New Revision: 46156

Modified:
   python/trunk/Lib/test/regrtest.py
Log:
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.


Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Tue May 23 23:51:35 2006
@@ -545,6 +545,7 @@
                 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 @@
                     dircache.reset()
                     linecache.clearcache()
                     mimetypes._default_mime_types()
+                    struct._cache.clear()
                     doctest.master = None
                 if indirect_test:
                     def run_the_test():


More information about the Python-checkins mailing list