From acdf159b245aaac28f54dd10606911386ab39058 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 19 Jun 2017 15:42:43 +0200 Subject: [PATCH] bpo-29887: test_normalization handles PermissionError (#1196) (#2275) Skip test_normalization.test_main() if download raises a permission error. (cherry picked from commit d13d54748d3a7db023d9db37223ea7d40bb8f8e3) --- Lib/test/test_normalization.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py index c6f8c93119f..30424564450 100644 --- a/Lib/test/test_normalization.py +++ b/Lib/test/test_normalization.py @@ -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}")