[Python-checkins] commit of r41534 - python/trunk/Lib/test

neal.norwitz@python.org neal.norwitz at python.org
Fri Nov 25 03:55:54 CET 2005


Author: neal.norwitz
Date: Fri Nov 25 03:55:49 2005
New Revision: 41534

Modified:
   python/trunk/Lib/test/regrtest.py
Log:
Cleanup a bit more references so test_urllibnet is stable (test_urllib2 is sometimes stable, at least in isolation)

Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Fri Nov 25 03:55:49 2005
@@ -490,8 +490,8 @@
                 pic = sys.path_importer_cache.copy()
                 import gc
                 def cleanup():
-                    import _strptime, urlparse, warnings, dircache
-                    import linecache
+                    import _strptime, linecache, warnings, dircache
+                    import urlparse, urllib, urllib2
                     from distutils.dir_util import _path_created
                     _path_created.clear()
                     warnings.filters[:] = fs
@@ -499,6 +499,8 @@
                     sre.purge()
                     _strptime._regex_cache.clear()
                     urlparse.clear_cache()
+                    urllib.urlcleanup()
+                    urllib2.install_opener(None)
                     copy_reg.dispatch_table.clear()
                     copy_reg.dispatch_table.update(ps)
                     sys.path_importer_cache.clear()


More information about the Python-checkins mailing list