mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
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.
This commit is contained in:
parent
5ea052bb0c
commit
2488c1e1b6
2 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue