mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Skip tests if the file mapping file cannot be fetched.
This commit is contained in:
parent
071ef771dc
commit
0f95ba9341
1 changed files with 4 additions and 1 deletions
|
@ -276,7 +276,10 @@ class TestBase_Mapping(unittest.TestCase):
|
||||||
|
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
unittest.TestCase.__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):
|
def open_mapping_file(self):
|
||||||
return test_support.open_urlresource(self.mapfileurl)
|
return test_support.open_urlresource(self.mapfileurl)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue