Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbaa10e

Browse files
CheckNormalizationTest.txt into CI
1 parent81ae8e2 commitdbaa10e

File tree

3 files changed

+19136
-7
lines changed

3 files changed

+19136
-7
lines changed

‎scripts/unicode.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ class OffsetType(enum.IntEnum):
7272
BitPos=int
7373

7474

75-
deffetch_open(filename:str):
75+
deffetch_open(filename:str,local_prefix:str=""):
7676
"""Opens `filename` and return its corresponding file object. If `filename` isn't on disk,
7777
fetches it from `https://www.unicode.org/Public/`. Exits with code 1 on failure.
7878
"""
7979
basename=os.path.basename(filename)
80-
ifnotos.path.exists(basename):
80+
localname=os.path.join(local_prefix,basename)
81+
ifnotos.path.exists(localname):
8182
urllib.request.urlretrieve(
82-
f"https://www.unicode.org/Public/{UNICODE_VERSION}/ucd/{filename}",basename
83+
f"https://www.unicode.org/Public/{UNICODE_VERSION}/ucd/{filename}",
84+
localname,
8385
)
8486
try:
8587
returnopen(basename,encoding="utf-8")
@@ -684,7 +686,7 @@ def main(module_filename: str):
684686
variation_table=make_variation_sequence_table(emoji_variations,width_map)
685687

686688
# Download normalization test file for use by tests
687-
fetch_open("NormalizationTest.txt")
689+
fetch_open("NormalizationTest.txt","../tests/")
688690

689691
print("------------------------")
690692
total_size=0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp