Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d13d547

Browse files
authored
bpo-29887: test_normalization handles PermissionError (#1196)
Skip test_normalization.test_main() if download raises a permission error.
1 parent ec4b172 commit d13d547

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)