[Python-checkins] cpython (merge 3.4 -> default): Issue #18258: Fix test discovery for test_codecmaps_*.
zach.ware
python-checkins at python.org
Wed Jul 2 03:25:10 CEST 2014
http://hg.python.org/cpython/rev/b08921c7d1ec
changeset: 91516:b08921c7d1ec
parent: 91514:3d452fd11899
parent: 91515:27feb652d3ad
user: Zachary Ware <zachary.ware at gmail.com>
date: Tue Jul 01 20:06:19 2014 -0500
summary:
Issue #18258: Fix test discovery for test_codecmaps_*.
files:
Lib/test/multibytecodec_support.py | 3 +--
Lib/test/test_codecmaps_cn.py | 5 +----
Lib/test/test_codecmaps_hk.py | 5 +----
Lib/test/test_codecmaps_jp.py | 5 +----
Lib/test/test_codecmaps_kr.py | 5 +----
Lib/test/test_codecmaps_tw.py | 5 +----
6 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/Lib/test/multibytecodec_support.py b/Lib/test/multibytecodec_support.py
--- a/Lib/test/multibytecodec_support.py
+++ b/Lib/test/multibytecodec_support.py
@@ -277,8 +277,7 @@
supmaps = []
codectests = []
- def __init__(self, *args, **kw):
- unittest.TestCase.__init__(self, *args, **kw)
+ def setUp(self):
try:
self.open_mapping_file().close() # test it to report the error early
except (OSError, HTTPException):
diff --git a/Lib/test/test_codecmaps_cn.py b/Lib/test/test_codecmaps_cn.py
--- a/Lib/test/test_codecmaps_cn.py
+++ b/Lib/test/test_codecmaps_cn.py
@@ -25,8 +25,5 @@
'trunk/charset/data/xml/gb-18030-2000.xml'
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecmaps_hk.py b/Lib/test/test_codecmaps_hk.py
--- a/Lib/test/test_codecmaps_hk.py
+++ b/Lib/test/test_codecmaps_hk.py
@@ -12,8 +12,5 @@
encoding = 'big5hkscs'
mapfileurl = 'http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT'
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecmaps_jp.py b/Lib/test/test_codecmaps_jp.py
--- a/Lib/test/test_codecmaps_jp.py
+++ b/Lib/test/test_codecmaps_jp.py
@@ -59,8 +59,5 @@
mapfileurl = 'http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT'
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecmaps_kr.py b/Lib/test/test_codecmaps_kr.py
--- a/Lib/test/test_codecmaps_kr.py
+++ b/Lib/test/test_codecmaps_kr.py
@@ -36,8 +36,5 @@
pass_enctest = [(b'\\', '\u20a9')]
pass_dectest = [(b'\\', '\u20a9')]
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecmaps_tw.py b/Lib/test/test_codecmaps_tw.py
--- a/Lib/test/test_codecmaps_tw.py
+++ b/Lib/test/test_codecmaps_tw.py
@@ -26,8 +26,5 @@
(b"\xFFxy", "replace", "\ufffdxy"),
)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list