summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-12-05 16:05:17 (GMT)
committerGitHub <noreply@github.com>2022-12-05 16:05:17 (GMT)
commitc067023d878225ebe0b71eb55e7e98b272c4d5b2 (patch)
treeaf71c24bce57a0686afe5fe0acfc822ba468a9c7 /Lib
parente699e5c20fc495952905597edfa82de0c1848f8c (diff)
downloadcpython-c067023d878225ebe0b71eb55e7e98b272c4d5b2.zip
cpython-c067023d878225ebe0b71eb55e7e98b272c4d5b2.tar.gz
cpython-c067023d878225ebe0b71eb55e7e98b272c4d5b2.tar.bz2
gh-99892: test_unicodedata: skip test on download failure (GH-100011)
Skip test_normalization() of test_unicodedata if it fails to download NormalizationTest.txt file from pythontest.net. (cherry picked from commit 2488c1e1b66366a3a933ff248eff080fabd2351c) Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicodedata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 2a93f0f..ad9d3d6 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -12,7 +12,8 @@ import sys
import unicodedata
import unittest
from test.support import (open_urlresource, requires_resource, script_helper,
- cpython_only, check_disallow_instantiation)
+ cpython_only, check_disallow_instantiation,
+ ResourceDenied)
class UnicodeMethodsTest(unittest.TestCase):
@@ -345,8 +346,8 @@ class NormalizationTest(unittest.TestCase):
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}")
+ except (OSError, HTTPException) as exc:
+ self.skipTest(f"Failed to download {TESTDATAURL}: {exc}")
with testdata:
self.run_normalization_tests(testdata)