Skip to content

Commit

Permalink
bpo-29887: test_normalization handles PermissionError (#1196)
Browse files Browse the repository at this point in the history
Skip test_normalization.test_main() if download raises a permission
error.
  • Loading branch information
vstinner committed Apr 20, 2017
1 parent ec4b172 commit d13d547
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/test_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def test_main(self):
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}")

Expand Down

0 comments on commit d13d547

Please sign in to comment.