Skip to content

Commit acdf159

Browse files
authored
bpo-29887: test_normalization handles PermissionError (python#1196) (python#2275)
Skip test_normalization.test_main() if download raises a permission error. (cherry picked from commit d13d547)
1 parent 51f40a8 commit acdf159

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_normalization.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def test_main(self):
4040
try:
4141
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
4242
check=check_version)
43+
except PermissionError:
44+
self.skipTest(f"Permission error when downloading {TESTDATAURL} "
45+
f"into the test data directory")
4346
except (OSError, HTTPException):
4447
self.fail(f"Could not retrieve {TESTDATAURL}")
4548

0 commit comments

Comments
 (0)