From 0f95ba93418f401441ce4c4e2bfc580306ee47d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 8 Mar 2008 11:59:08 +0000 Subject: Skip tests if the file mapping file cannot be fetched. --- Lib/test/test_multibytecodec_support.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py index 42df9d7..48e9089 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) -- cgit v0.12