]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Skip tests if the file mapping file cannot be fetched.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 8 Mar 2008 11:59:08 +0000 (11:59 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 8 Mar 2008 11:59:08 +0000 (11:59 +0000)
Lib/test/test_multibytecodec_support.py

index 42df9d7863aaf799cd151b9362e8271b184afdbb..48e90899ddaf1adb7e7761883d9bbfb2d511c582 100644 (file)
@@ -276,7 +276,10 @@ class TestBase_Mapping(unittest.TestCase):
 
     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:
+            raise test_support.TestSkipped("Could not retrieve "+self.mapfileurl)
 
     def open_mapping_file(self):
         return test_support.open_urlresource(self.mapfileurl)