aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_unicodedata.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-12-05 16:37:40 +0100
committerGitHub <noreply@github.com>2022-12-05 16:37:40 +0100
commit2488c1e1b66366a3a933ff248eff080fabd2351c (patch)
treeb6c47e57b5b07c4c5ea07a34d950e8b1a4ac7101 /Lib/test/test_unicodedata.py
parent5ea052bb0c8fa76867751046c89f69db5661ed4f (diff)
downloadcpython-2488c1e1b66366a3a933ff248eff080fabd2351c.tar.gz
cpython-2488c1e1b66366a3a933ff248eff080fabd2351c.zip
gh-99892: test_unicodedata: skip test on download failure (#100011)
Skip test_normalization() of test_unicodedata if it fails to download NormalizationTest.txt file from pythontest.net.
Diffstat (limited to 'Lib/test/test_unicodedata.py')
-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 a85bda3144b..74503c89e55 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):
@@ -364,8 +365,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)