Skip to content

Commit c51a8e9

Browse files
serhiy-storchakavstinner
authored andcommitted
[2.7] Rename test_ file that is really a support file to remove test_ prefix. (#2548)
I thought I had run the full test suite before the last checkin, but obviously I didn't. test_multibytecodec_support.py isn't really a test file, it is a support file that contains a base test class. Rename it to multibytecodec_support so that regrtest test discovery doesn't think it is a test file that should be run.. (cherry picked from commit 75d9aca)
1 parent d7955b8 commit c51a8e9

12 files changed

+60
-60
lines changed

Lib/test/test_multibytecodec_support.py renamed to Lib/test/multibytecodec_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# test_multibytecodec_support.py
1+
# multibytecodec_support.py
22
# Common Unittest Routines for CJK codecs
33
#
44

Lib/test/test_codecencodings_cn.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class Test_GB2312(test_multibytecodec_support.TestBase, unittest.TestCase):
10+
class Test_GB2312(multibytecodec_support.TestBase, unittest.TestCase):
1111
encoding = 'gb2312'
12-
tstring = test_multibytecodec_support.load_teststring('gb2312')
12+
tstring = multibytecodec_support.load_teststring('gb2312')
1313
codectests = (
1414
# invalid bytes
1515
("abc\x81\x81\xc1\xc4", "strict", None),
@@ -20,9 +20,9 @@ class Test_GB2312(test_multibytecodec_support.TestBase, unittest.TestCase):
2020
("\xc1\x64", "strict", None),
2121
)
2222

23-
class Test_GBK(test_multibytecodec_support.TestBase, unittest.TestCase):
23+
class Test_GBK(multibytecodec_support.TestBase, unittest.TestCase):
2424
encoding = 'gbk'
25-
tstring = test_multibytecodec_support.load_teststring('gbk')
25+
tstring = multibytecodec_support.load_teststring('gbk')
2626
codectests = (
2727
# invalid bytes
2828
("abc\x80\x80\xc1\xc4", "strict", None),
@@ -34,9 +34,9 @@ class Test_GBK(test_multibytecodec_support.TestBase, unittest.TestCase):
3434
(u"\u30fb", "strict", None),
3535
)
3636

37-
class Test_GB18030(test_multibytecodec_support.TestBase, unittest.TestCase):
37+
class Test_GB18030(multibytecodec_support.TestBase, unittest.TestCase):
3838
encoding = 'gb18030'
39-
tstring = test_multibytecodec_support.load_teststring('gb18030')
39+
tstring = multibytecodec_support.load_teststring('gb18030')
4040
codectests = (
4141
# invalid bytes
4242
("abc\x80\x80\xc1\xc4", "strict", None),
@@ -55,9 +55,9 @@ class Test_GB18030(test_multibytecodec_support.TestBase, unittest.TestCase):
5555
)
5656
has_iso10646 = True
5757

58-
class Test_HZ(test_multibytecodec_support.TestBase, unittest.TestCase):
58+
class Test_HZ(multibytecodec_support.TestBase, unittest.TestCase):
5959
encoding = 'hz'
60-
tstring = test_multibytecodec_support.load_teststring('hz')
60+
tstring = multibytecodec_support.load_teststring('hz')
6161
codectests = (
6262
# test '~\n' (3 lines)
6363
(b'This sentence is in ASCII.\n'

Lib/test/test_codecencodings_hk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class Test_Big5HKSCS(test_multibytecodec_support.TestBase, unittest.TestCase):
10+
class Test_Big5HKSCS(multibytecodec_support.TestBase, unittest.TestCase):
1111
encoding = 'big5hkscs'
12-
tstring = test_multibytecodec_support.load_teststring('big5hkscs')
12+
tstring = multibytecodec_support.load_teststring('big5hkscs')
1313
codectests = (
1414
# invalid bytes
1515
("abc\x80\x80\xc1\xc4", "strict", None),

Lib/test/test_codecencodings_iso2022.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Codec encoding tests for ISO 2022 encodings.
22

33
from test import test_support
4-
from test import test_multibytecodec_support
4+
from test import multibytecodec_support
55
import unittest
66

77
COMMON_CODEC_TESTS = (
@@ -11,23 +11,23 @@
1111
(b'ab\x1B$def', 'replace', u'ab\uFFFD'),
1212
)
1313

14-
class Test_ISO2022_JP(test_multibytecodec_support.TestBase, unittest.TestCase):
14+
class Test_ISO2022_JP(multibytecodec_support.TestBase, unittest.TestCase):
1515
encoding = 'iso2022_jp'
16-
tstring = test_multibytecodec_support.load_teststring('iso2022_jp')
16+
tstring = multibytecodec_support.load_teststring('iso2022_jp')
1717
codectests = COMMON_CODEC_TESTS + (
1818
(b'ab\x1BNdef', 'replace', u'ab\x1BNdef'),
1919
)
2020

21-
class Test_ISO2022_JP2(test_multibytecodec_support.TestBase, unittest.TestCase):
21+
class Test_ISO2022_JP2(multibytecodec_support.TestBase, unittest.TestCase):
2222
encoding = 'iso2022_jp_2'
23-
tstring = test_multibytecodec_support.load_teststring('iso2022_jp')
23+
tstring = multibytecodec_support.load_teststring('iso2022_jp')
2424
codectests = COMMON_CODEC_TESTS + (
2525
(b'ab\x1BNdef', 'replace', u'abdef'),
2626
)
2727

28-
class Test_ISO2022_KR(test_multibytecodec_support.TestBase, unittest.TestCase):
28+
class Test_ISO2022_KR(multibytecodec_support.TestBase, unittest.TestCase):
2929
encoding = 'iso2022_kr'
30-
tstring = test_multibytecodec_support.load_teststring('iso2022_kr')
30+
tstring = multibytecodec_support.load_teststring('iso2022_kr')
3131
codectests = COMMON_CODEC_TESTS + (
3232
(b'ab\x1BNdef', 'replace', u'ab\x1BNdef'),
3333
)

Lib/test/test_codecencodings_jp.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class Test_CP932(test_multibytecodec_support.TestBase, unittest.TestCase):
10+
class Test_CP932(multibytecodec_support.TestBase, unittest.TestCase):
1111
encoding = 'cp932'
12-
tstring = test_multibytecodec_support.load_teststring('shift_jis')
12+
tstring = multibytecodec_support.load_teststring('shift_jis')
1313
codectests = (
1414
# invalid bytes
1515
("abc\x81\x00\x81\x00\x82\x84", "strict", None),
@@ -22,10 +22,10 @@ class Test_CP932(test_multibytecodec_support.TestBase, unittest.TestCase):
2222
("\x81\x5f\x81\x61\x81\x7c", "replace", u"\uff3c\u2225\uff0d"),
2323
)
2424

25-
class Test_EUC_JISX0213(test_multibytecodec_support.TestBase,
25+
class Test_EUC_JISX0213(multibytecodec_support.TestBase,
2626
unittest.TestCase):
2727
encoding = 'euc_jisx0213'
28-
tstring = test_multibytecodec_support.load_teststring('euc_jisx0213')
28+
tstring = multibytecodec_support.load_teststring('euc_jisx0213')
2929
codectests = (
3030
# invalid bytes
3131
("abc\x80\x80\xc1\xc4", "strict", None),
@@ -52,10 +52,10 @@ class Test_EUC_JISX0213(test_multibytecodec_support.TestBase,
5252
("\xc1\x64", "strict", None),
5353
)
5454

55-
class Test_EUC_JP_COMPAT(test_multibytecodec_support.TestBase,
55+
class Test_EUC_JP_COMPAT(multibytecodec_support.TestBase,
5656
unittest.TestCase):
5757
encoding = 'euc_jp'
58-
tstring = test_multibytecodec_support.load_teststring('euc_jp')
58+
tstring = multibytecodec_support.load_teststring('euc_jp')
5959
codectests = eucjp_commontests + (
6060
("\xa1\xc0\\", "strict", u"\uff3c\\"),
6161
(u"\xa5", "strict", "\x5c"),
@@ -70,17 +70,17 @@ class Test_EUC_JP_COMPAT(test_multibytecodec_support.TestBase,
7070
("abc\x80\x80\x82\x84def", "ignore", u"abc\uff44def"),
7171
)
7272

73-
class Test_SJIS_COMPAT(test_multibytecodec_support.TestBase, unittest.TestCase):
73+
class Test_SJIS_COMPAT(multibytecodec_support.TestBase, unittest.TestCase):
7474
encoding = 'shift_jis'
75-
tstring = test_multibytecodec_support.load_teststring('shift_jis')
75+
tstring = multibytecodec_support.load_teststring('shift_jis')
7676
codectests = shiftjis_commonenctests + (
7777
("\\\x7e", "strict", u"\\\x7e"),
7878
("\x81\x5f\x81\x61\x81\x7c", "strict", u"\uff3c\u2016\u2212"),
7979
)
8080

81-
class Test_SJISX0213(test_multibytecodec_support.TestBase, unittest.TestCase):
81+
class Test_SJISX0213(multibytecodec_support.TestBase, unittest.TestCase):
8282
encoding = 'shift_jisx0213'
83-
tstring = test_multibytecodec_support.load_teststring('shift_jisx0213')
83+
tstring = multibytecodec_support.load_teststring('shift_jisx0213')
8484
codectests = (
8585
# invalid bytes
8686
("abc\x80\x80\x82\x84", "strict", None),

Lib/test/test_codecencodings_kr.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase):
10+
class Test_CP949(multibytecodec_support.TestBase, unittest.TestCase):
1111
encoding = 'cp949'
12-
tstring = test_multibytecodec_support.load_teststring('cp949')
12+
tstring = multibytecodec_support.load_teststring('cp949')
1313
codectests = (
1414
# invalid bytes
1515
("abc\x80\x80\xc1\xc4", "strict", None),
@@ -19,9 +19,9 @@ class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase):
1919
("abc\x80\x80\xc1\xc4", "ignore", u"abc\uc894"),
2020
)
2121

22-
class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase):
22+
class Test_EUCKR(multibytecodec_support.TestBase, unittest.TestCase):
2323
encoding = 'euc_kr'
24-
tstring = test_multibytecodec_support.load_teststring('euc_kr')
24+
tstring = multibytecodec_support.load_teststring('euc_kr')
2525
codectests = (
2626
# invalid bytes
2727
("abc\x80\x80\xc1\xc4", "strict", None),
@@ -49,9 +49,9 @@ class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase):
4949
("\xc1\xc4", "strict", u"\uc894"),
5050
)
5151

52-
class Test_JOHAB(test_multibytecodec_support.TestBase, unittest.TestCase):
52+
class Test_JOHAB(multibytecodec_support.TestBase, unittest.TestCase):
5353
encoding = 'johab'
54-
tstring = test_multibytecodec_support.load_teststring('johab')
54+
tstring = multibytecodec_support.load_teststring('johab')
5555
codectests = (
5656
# invalid bytes
5757
("abc\x80\x80\xc1\xc4", "strict", None),

Lib/test/test_codecencodings_tw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class Test_Big5(test_multibytecodec_support.TestBase, unittest.TestCase):
10+
class Test_Big5(multibytecodec_support.TestBase, unittest.TestCase):
1111
encoding = 'big5'
12-
tstring = test_multibytecodec_support.load_teststring('big5')
12+
tstring = multibytecodec_support.load_teststring('big5')
1313
codectests = (
1414
# invalid bytes
1515
("abc\x80\x80\xc1\xc4", "strict", None),

Lib/test/test_codecmaps_cn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
10+
class TestGB2312Map(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'gb2312'
1313
mapfileurl = 'http://www.pythontest.net/unicode/EUC-CN.TXT'
1414

15-
class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
15+
class TestGBKMap(multibytecodec_support.TestBase_Mapping,
1616
unittest.TestCase):
1717
encoding = 'gbk'
1818
mapfileurl = 'http://www.pythontest.net/unicode/CP936.TXT'
1919

20-
class TestGB18030Map(test_multibytecodec_support.TestBase_Mapping,
20+
class TestGB18030Map(multibytecodec_support.TestBase_Mapping,
2121
unittest.TestCase):
2222
encoding = 'gb18030'
2323
mapfileurl = 'http://www.pythontest.net/unicode/gb-18030-2000.xml'

Lib/test/test_codecmaps_hk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class TestBig5HKSCSMap(test_multibytecodec_support.TestBase_Mapping,
10+
class TestBig5HKSCSMap(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'big5hkscs'
1313
mapfileurl = 'http://www.pythontest.net/unicode/BIG5HKSCS-2004.TXT'

Lib/test/test_codecmaps_jp.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#
55

66
from test import test_support
7-
from test import test_multibytecodec_support
7+
from test import multibytecodec_support
88
import unittest
99

10-
class TestCP932Map(test_multibytecodec_support.TestBase_Mapping,
10+
class TestCP932Map(multibytecodec_support.TestBase_Mapping,
1111
unittest.TestCase):
1212
encoding = 'cp932'
1313
mapfileurl = 'http://www.pythontest.net/unicode/CP932.TXT'
@@ -22,14 +22,14 @@ class TestCP932Map(test_multibytecodec_support.TestBase_Mapping,
2222
supmaps.append((chr(i), unichr(i+0xfec0)))
2323

2424

25-
class TestEUCJPCOMPATMap(test_multibytecodec_support.TestBase_Mapping,
25+
class TestEUCJPCOMPATMap(multibytecodec_support.TestBase_Mapping,
2626
unittest.TestCase):
2727
encoding = 'euc_jp'
2828
mapfilename = 'EUC-JP.TXT'
2929
mapfileurl = 'http://www.pythontest.net/unicode/EUC-JP.TXT'
3030

3131

32-
class TestSJISCOMPATMap(test_multibytecodec_support.TestBase_Mapping,
32+
class TestSJISCOMPATMap(multibytecodec_support.TestBase_Mapping,
3333
unittest.TestCase):
3434
encoding = 'shift_jis'
3535
mapfilename = 'SHIFTJIS.TXT'
@@ -43,14 +43,14 @@ class TestSJISCOMPATMap(test_multibytecodec_support.TestBase_Mapping,
4343
('\x81_', u'\\'),
4444
]
4545

46-
class TestEUCJISX0213Map(test_multibytecodec_support.TestBase_Mapping,
46+
class TestEUCJISX0213Map(multibytecodec_support.TestBase_Mapping,
4747
unittest.TestCase):
4848
encoding = 'euc_jisx0213'
4949
mapfilename = 'EUC-JISX0213.TXT'
5050
mapfileurl = 'http://www.pythontest.net/unicode/EUC-JISX0213.TXT'
5151

5252

53-
class TestSJISX0213Map(test_multibytecodec_support.TestBase_Mapping,
53+
class TestSJISX0213Map(multibytecodec_support.TestBase_Mapping,
5454
unittest.TestCase):
5555
encoding = 'shift_jisx0213'
5656
mapfilename = 'SHIFT_JISX0213.TXT'

0 commit comments

Comments
 (0)