summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-04 23:13:41 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-04 23:13:41 (GMT)
commitd8cea79bb4f4b33fb4795414c73e99b2724f557e (patch)
treebb195e57f88c8fea073f09578e5fdd2d68c20663
parent7b216c52e431360a630be65c349b113a0486121d (diff)
downloadcpython-d8cea79bb4f4b33fb4795414c73e99b2724f557e.zip
cpython-d8cea79bb4f4b33fb4795414c73e99b2724f557e.tar.gz
cpython-d8cea79bb4f4b33fb4795414c73e99b2724f557e.tar.bz2
Fix spurious test failure of test_socket_ssl when run in this order:
test_codecmaps_tw test_importhooks test_socket_ssl I don't completely understand the cause, but there's a lot of import magic going on and this is the smallest change which fixes the problem.
-rw-r--r--Lib/test/test_importhooks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_importhooks.py b/Lib/test/test_importhooks.py
index 5af7847..81b7ad1 100644
--- a/Lib/test/test_importhooks.py
+++ b/Lib/test/test_importhooks.py
@@ -252,6 +252,10 @@ class ImportHooksTestCase(ImportHooksBaseTestCase):
for mname in mnames:
m = __import__(mname, globals(), locals(), ["__dummy__"])
m.__loader__ # to make sure we actually handled the import
+ # Delete urllib from modules because urlparse was imported above.
+ # Without this hack, test_socket_ssl fails if run in this order:
+ # regrtest.py test_codecmaps_tw test_importhooks test_socket_ssl
+ del sys.modules['urllib']
def test_main():
test_support.run_unittest(ImportHooksTestCase)