Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4196296

Browse files
committed
Update test data to 4.1; disable PRI #29 for now.
1 parent 0e2f9b2 commit 4196296

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

Lib/test/test_normalization.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import os
55
from unicodedata import normalize
66

7-
TESTDATAFILE = "NormalizationTest-3.2.0" + os.extsep + "txt"
8-
TESTDATAURL = "http://www.unicode.org/Public/3.2-Update/" + TESTDATAFILE
7+
TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
8+
TESTDATAURL = "http://www.unicode.org/Public/4.1.0/ucd/" + TESTDATAFILE
99

1010
class RangeError:
1111
pass
@@ -38,12 +38,23 @@ def test_main():
3838
if not line:
3939
continue
4040
if line.startswith("@Part"):
41-
part = line
41+
part = line.split()[0]
42+
continue
43+
if part == "@Part3":
44+
# XXX we don't support PRI #29 yet, so skip these tests for now
4245
continue
4346
try:
4447
c1,c2,c3,c4,c5 = [unistr(x) for x in line.split(';')[:-1]]
4548
except RangeError:
46-
# Skip unsupported characters
49+
# Skip unsupported characters;
50+
# try atleast adding c1 if we are in part1
51+
if part == "@Part1":
52+
try:
53+
c1=unistr(line.split(';')[0])
54+
except RangeError:
55+
pass
56+
else:
57+
part1_data[c1] = 1
4758
continue
4859

4960
if verbose:

0 commit comments

Comments
 (0)