From: Martin v. Löwis Date: Sat, 8 Mar 2008 11:59:08 +0000 (+0000) Subject: Skip tests if the file mapping file cannot be fetched. X-Git-Tag: v3.0a4~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f95ba93418f401441ce4c4e2bfc580306ee47d4;p=thirdparty%2FPython%2Fcpython.git Skip tests if the file mapping file cannot be fetched. --- diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py index 42df9d7863aa..48e90899ddaf 100644 --- a/Lib/test/test_multibytecodec_support.py +++ b/Lib/test/test_multibytecodec_support.py @@ -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)