Kaydet (Commit) d9de794c authored tarafından Zachary Ware's avatar Zachary Ware

Issue #18258: Fix test discovery for test_codecmaps_*.

üst 44f09ebd
...@@ -277,8 +277,7 @@ class TestBase_Mapping(unittest.TestCase): ...@@ -277,8 +277,7 @@ class TestBase_Mapping(unittest.TestCase):
supmaps = [] supmaps = []
codectests = [] codectests = []
def __init__(self, *args, **kw): def setUp(self):
unittest.TestCase.__init__(self, *args, **kw)
try: try:
self.open_mapping_file().close() # test it to report the error early self.open_mapping_file().close() # test it to report the error early
except (OSError, HTTPException): except (OSError, HTTPException):
......
...@@ -25,8 +25,5 @@ class TestGB18030Map(multibytecodec_support.TestBase_Mapping, ...@@ -25,8 +25,5 @@ class TestGB18030Map(multibytecodec_support.TestBase_Mapping,
'trunk/charset/data/xml/gb-18030-2000.xml' 'trunk/charset/data/xml/gb-18030-2000.xml'
def test_main():
support.run_unittest(__name__)
if __name__ == "__main__": if __name__ == "__main__":
test_main() unittest.main()
...@@ -12,8 +12,5 @@ class TestBig5HKSCSMap(multibytecodec_support.TestBase_Mapping, ...@@ -12,8 +12,5 @@ class TestBig5HKSCSMap(multibytecodec_support.TestBase_Mapping,
encoding = 'big5hkscs' encoding = 'big5hkscs'
mapfileurl = 'http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT' mapfileurl = 'http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT'
def test_main():
support.run_unittest(__name__)
if __name__ == "__main__": if __name__ == "__main__":
test_main() unittest.main()
...@@ -59,8 +59,5 @@ class TestSJISX0213Map(multibytecodec_support.TestBase_Mapping, ...@@ -59,8 +59,5 @@ class TestSJISX0213Map(multibytecodec_support.TestBase_Mapping,
mapfileurl = 'http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT' mapfileurl = 'http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT'
def test_main():
support.run_unittest(__name__)
if __name__ == "__main__": if __name__ == "__main__":
test_main() unittest.main()
...@@ -36,8 +36,5 @@ class TestJOHABMap(multibytecodec_support.TestBase_Mapping, ...@@ -36,8 +36,5 @@ class TestJOHABMap(multibytecodec_support.TestBase_Mapping,
pass_enctest = [(b'\\', '\u20a9')] pass_enctest = [(b'\\', '\u20a9')]
pass_dectest = [(b'\\', '\u20a9')] pass_dectest = [(b'\\', '\u20a9')]
def test_main():
support.run_unittest(__name__)
if __name__ == "__main__": if __name__ == "__main__":
test_main() unittest.main()
...@@ -26,8 +26,5 @@ class TestCP950Map(multibytecodec_support.TestBase_Mapping, ...@@ -26,8 +26,5 @@ class TestCP950Map(multibytecodec_support.TestBase_Mapping,
(b"\xFFxy", "replace", "\ufffdxy"), (b"\xFFxy", "replace", "\ufffdxy"),
) )
def test_main():
support.run_unittest(__name__)
if __name__ == "__main__": if __name__ == "__main__":
test_main() unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment