From d1bd20ba7bd02e9118b2759e27be24a4f84953fe 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. (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 c6f8c93119f436..30424564450227 100644 --- a/Lib/test/test_normalization.py +++ b/Lib/test/test_normalization.py @@ -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}")