MCPcopy Index your code
hub / github.com/python/cpython / download_test_data_file

Function download_test_data_file

Lib/test/test_unicodedata.py:41–52  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

39
40
41def download_test_data_file(filename):
42 TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{filename}"
43
44 try:
45 return open_urlresource(TESTDATAURL, encoding="utf-8", check=check_version)
46 except PermissionError:
47 raise unittest.SkipTest(
48 f"Permission error when downloading {TESTDATAURL} "
49 f"into the test data directory"
50 )
51 except (OSError, HTTPException) as exc:
52 raise unittest.SkipTest(f"Failed to download {TESTDATAURL}: {exc}")
53
54
55class UnicodeMethodsTest(unittest.TestCase):

Callers 3

test_all_namesMethod · 0.85
test_normalizationMethod · 0.85
test_grapheme_breakMethod · 0.85

Calls 1

open_urlresourceFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…