Skip to content

[3.10] gh-99892: test_unicodedata: skip test on download failure (GH-100011) #100012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Lib/test/test_unicodedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
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):
Expand Down Expand Up @@ -345,8 +346,8 @@ def test_normalization(self):
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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Skip test_normalization() of test_unicodedata if it fails to download
NormalizationTest.txt file from pythontest.net. Patch by Victor Stinner.