From d13d54748d3a7db023d9db37223ea7d40bb8f8e3 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 20 Apr 2017 02:39:59 +0200 Subject: [PATCH] bpo-29887: test_normalization handles PermissionError (#1196) Skip test_normalization.test_main() if download raises a permission error. --- 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 c6f8c93119..3042456445 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}") -- 2.40.0