Skip to content

Commit 5a15508

Browse files
committed
#22650: test suite: load Unicode test data files from www.pythontest.net
1 parent abd1c97 commit 5a15508

File tree

7 files changed

+16
-24
lines changed

7 files changed

+16
-24
lines changed

Lib/test/test_codecmaps_cn.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@
1010
class TestGB2312Map(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'gb2312'
13-
mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'
13+
mapfileurl = 'http://www.pythontest.net/unicode/EUC-CN.TXT'
1414

1515
class TestGBKMap(multibytecodec_support.TestBase_Mapping,
1616
unittest.TestCase):
1717
encoding = 'gbk'
18-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \
19-
'MICSFT/WINDOWS/CP936.TXT'
18+
mapfileurl = 'http://www.pythontest.net/unicode/CP936.TXT'
2019

2120
class TestGB18030Map(multibytecodec_support.TestBase_Mapping,
2221
unittest.TestCase):
2322
encoding = 'gb18030'
24-
mapfileurl = 'http://source.icu-project.org/repos/icu/data/' \
25-
'trunk/charset/data/xml/gb-18030-2000.xml'
23+
mapfileurl = 'http://www.pythontest.net/unicode/gb-18030-2000.xml'
2624

2725

2826
if __name__ == "__main__":

Lib/test/test_codecmaps_hk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class TestBig5HKSCSMap(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'big5hkscs'
13-
mapfileurl = 'http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT'
13+
mapfileurl = 'http://www.pythontest.net/unicode/BIG5HKSCS-2004.TXT'
1414

1515
if __name__ == "__main__":
1616
unittest.main()

Lib/test/test_codecmaps_jp.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
class TestCP932Map(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'cp932'
13-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \
14-
'WINDOWS/CP932.TXT'
13+
mapfileurl = 'http://www.pythontest.net/unicode/CP932.TXT'
1514
supmaps = [
1615
(b'\x80', '\u0080'),
1716
(b'\xa0', '\uf8f0'),
@@ -27,15 +26,14 @@ class TestEUCJPCOMPATMap(multibytecodec_support.TestBase_Mapping,
2726
unittest.TestCase):
2827
encoding = 'euc_jp'
2928
mapfilename = 'EUC-JP.TXT'
30-
mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-JP.TXT'
29+
mapfileurl = 'http://www.pythontest.net/unicode/EUC-JP.TXT'
3130

3231

3332
class TestSJISCOMPATMap(multibytecodec_support.TestBase_Mapping,
3433
unittest.TestCase):
3534
encoding = 'shift_jis'
3635
mapfilename = 'SHIFTJIS.TXT'
37-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE' \
38-
'/EASTASIA/JIS/SHIFTJIS.TXT'
36+
mapfileurl = 'http://www.pythontest.net/unicode/SHIFTJIS.TXT'
3937
pass_enctest = [
4038
(b'\x81_', '\\'),
4139
]
@@ -49,14 +47,14 @@ class TestEUCJISX0213Map(multibytecodec_support.TestBase_Mapping,
4947
unittest.TestCase):
5048
encoding = 'euc_jisx0213'
5149
mapfilename = 'EUC-JISX0213.TXT'
52-
mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-JISX0213.TXT'
50+
mapfileurl = 'http://www.pythontest.net/unicode/EUC-JISX0213.TXT'
5351

5452

5553
class TestSJISX0213Map(multibytecodec_support.TestBase_Mapping,
5654
unittest.TestCase):
5755
encoding = 'shift_jisx0213'
5856
mapfilename = 'SHIFT_JISX0213.TXT'
59-
mapfileurl = 'http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT'
57+
mapfileurl = 'http://www.pythontest.net/unicode/SHIFT_JISX0213.TXT'
6058

6159

6260
if __name__ == "__main__":

Lib/test/test_codecmaps_kr.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
class TestCP949Map(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'cp949'
13-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT' \
14-
'/WINDOWS/CP949.TXT'
13+
mapfileurl = 'http://www.pythontest.net/unicode/CP949.TXT'
1514

1615

1716
class TestEUCKRMap(multibytecodec_support.TestBase_Mapping,
1817
unittest.TestCase):
1918
encoding = 'euc_kr'
20-
mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-KR.TXT'
19+
mapfileurl = 'http://www.pythontest.net/unicode/EUC-KR.TXT'
2120

2221
# A4D4 HANGUL FILLER indicates the begin of 8-bytes make-up sequence.
2322
pass_enctest = [(b'\xa4\xd4', '\u3164')]
@@ -27,8 +26,7 @@ class TestEUCKRMap(multibytecodec_support.TestBase_Mapping,
2726
class TestJOHABMap(multibytecodec_support.TestBase_Mapping,
2827
unittest.TestCase):
2928
encoding = 'johab'
30-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/' \
31-
'KSC/JOHAB.TXT'
29+
mapfileurl = 'http://www.pythontest.net/unicode/JOHAB.TXT'
3230
# KS X 1001 standard assigned 0x5c as WON SIGN.
3331
# but, in early 90s that is the only era used johab widely,
3432
# the most softwares implements it as REVERSE SOLIDUS.

Lib/test/test_codecmaps_tw.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
class TestBIG5Map(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'big5'
13-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/' \
14-
'EASTASIA/OTHER/BIG5.TXT'
13+
mapfileurl = 'http://www.pythontest.net/unicode/BIG5.TXT'
1514

1615
class TestCP950Map(multibytecodec_support.TestBase_Mapping,
1716
unittest.TestCase):
1817
encoding = 'cp950'
19-
mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \
20-
'WINDOWS/CP950.TXT'
18+
mapfileurl = 'http://www.pythontest.net/unicode/CP950.TXT'
2119
pass_enctest = [
2220
(b'\xa2\xcc', '\u5341'),
2321
(b'\xa2\xce', '\u5345'),

Lib/test/test_normalization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from unicodedata import normalize, unidata_version
88

99
TESTDATAFILE = "NormalizationTest.txt"
10-
TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE
10+
TESTDATAURL = "http://www.pythontest.net/unicode/" + unidata_version + "/" + TESTDATAFILE
1111

1212
def check_version(testfile):
1313
hdr = testfile.readline()

Lib/test/test_ucn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_named_sequences_sample(self):
172172

173173
def test_named_sequences_full(self):
174174
# Check all the named sequences
175-
url = ("http://www.unicode.org/Public/%s/ucd/NamedSequences.txt" %
175+
url = ("http://www.pythontest.net/unicode/%s/NamedSequences.txt" %
176176
unicodedata.unidata_version)
177177
try:
178178
testdata = support.open_urlresource(url, encoding="utf-8",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy