Kaydet (Commit) acdf159b authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

bpo-29887: test_normalization handles PermissionError (#1196) (#2275)

Skip test_normalization.test_main() if download raises a permission
error.
(cherry picked from commit d13d5474)
üst 51f40a81
......@@ -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}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment