Skip tests if the file mapping file cannot be fetched.

This commit is contained in:
Martin v. Löwis 2008-03-08 11:59:08 +00:00
parent 071ef771dc
commit 0f95ba9341

View 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)