bpo-29887: test_normalization handles PermissionError (#1196)
Skip test_normalization.test_main() if download raises a permission error.
This commit is contained in:
parent
ec4b17239d
commit
d13d54748d
|
@ -40,6 +40,9 @@ class NormalizationTest(unittest.TestCase):
|
|||
try:
|
||||
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
|
||||
check=check_version)
|
||||
except PermissionError:
|
||||
self.skipTest(f"Permission error when downloading {TESTDATAURL} "
|
||||
f"into the test data directory")
|
||||
except (OSError, HTTPException):
|
||||
self.fail(f"Could not retrieve {TESTDATAURL}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue