[Python-checkins] r76012 - python/trunk/Lib/test/test_multibytecodec_support.py

antoine.pitrou python-checkins at python.org
Sun Nov 1 17:10:47 CET 2009


Author: antoine.pitrou
Date: Sun Nov  1 17:10:47 2009
New Revision: 76012

Log:
Hum, test skipping when the URL isn't reachable hadn't been applied to trunk.



Modified:
   python/trunk/Lib/test/test_multibytecodec_support.py

Modified: python/trunk/Lib/test/test_multibytecodec_support.py
==============================================================================
--- python/trunk/Lib/test/test_multibytecodec_support.py	(original)
+++ python/trunk/Lib/test/test_multibytecodec_support.py	Sun Nov  1 17:10:47 2009
@@ -266,7 +266,10 @@
 
     def __init__(self, *args, **kw):
         unittest.TestCase.__init__(self, *args, **kw)
-        self.open_mapping_file() # test it to report the error early
+        try:
+            self.open_mapping_file() # test it to report the error early
+        except IOError:
+            self.skipTest("Could not retrieve "+self.mapfileurl)
 
     def open_mapping_file(self):
         return test_support.open_urlresource(self.mapfileurl)


More information about the Python-checkins mailing list