Thread: [KoCo-CVS] [Commit] KoreanCodecs/test CodecTestBase.py test_cp949.py test_euc_kr.py test_iso_2022_kr
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-01-13 08:43:49
|
perky 03/01/13 00:43:48 Modified: test CodecTestBase.py test_cp949.py test_euc_kr.py test_iso_2022_kr.py test_mackorean.py test_qwerty2bul.py test_unijohab.py Log: Add callback tests to all codecs! Revision Changes Path 1.12 +3 -3 KoreanCodecs/test/CodecTestBase.py Index: CodecTestBase.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/CodecTestBase.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CodecTestBase.py 13 Jan 2003 08:38:36 -0000 1.11 +++ CodecTestBase.py 13 Jan 2003 08:43:47 -0000 1.12 @@ -16,7 +16,7 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: CodecTestBase.py,v 1.11 2003/01/13 08:38:36 perky Exp $ +# $Id: CodecTestBase.py,v 1.12 2003/01/13 08:43:47 perky Exp $ # import StringIO @@ -83,14 +83,14 @@ class TestCodecErrorCallback: if sys.hexversion >= 0x2030000: - def test_xmlcharrefreplace(self): + def test_StandardReplaceCallback(self): s = u"\u30b9\u30d1\u30e2 \xe4nd eggs" self.assertEqual( s.encode(self.encoding, "xmlcharrefreplace"), "スパモ änd eggs" ) - def test_xmlcharnamereplace(self): + def test_CustomReplaceCallback(self): import htmlentitydefs names = {} 1.13 +4 -2 KoreanCodecs/test/test_cp949.py Index: test_cp949.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_cp949.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- test_cp949.py 12 Jan 2003 22:54:13 -0000 1.12 +++ test_cp949.py 13 Jan 2003 08:43:48 -0000 1.13 @@ -16,7 +16,7 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: test_cp949.py,v 1.12 2003/01/12 22:54:13 perky Exp $ +# $Id: test_cp949.py,v 1.13 2003/01/13 08:43:48 perky Exp $ # import CodecTestBase @@ -24,7 +24,9 @@ def unichrs(s): return u''.join(map(unichr, map(eval, s.split('+')))) -class TestCP949(CodecTestBase.TestStreamReader, CodecTestBase.CodecTestBase): +class TestCP949(CodecTestBase.TestCodecErrorCallback, + CodecTestBase.TestStreamReader, + CodecTestBase.CodecTestBase): encoding = 'korean.cp949' textfile_chunk = ('texts/cp949', 'texts/cp949.utf-8') errortests = ( 1.10 +4 -2 KoreanCodecs/test/test_euc_kr.py Index: test_euc_kr.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_euc_kr.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- test_euc_kr.py 12 Jan 2003 22:54:13 -0000 1.9 +++ test_euc_kr.py 13 Jan 2003 08:43:48 -0000 1.10 @@ -16,12 +16,14 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: test_euc_kr.py,v 1.9 2003/01/12 22:54:13 perky Exp $ +# $Id: test_euc_kr.py,v 1.10 2003/01/13 08:43:48 perky Exp $ # import CodecTestBase -class TestEUCKR(CodecTestBase.TestStreamReader, CodecTestBase.CodecTestBase): +class TestEUCKR(CodecTestBase.TestCodecErrorCallback, + CodecTestBase.TestStreamReader, + CodecTestBase.CodecTestBase): encoding = 'korean.euc-kr' textfile_chunk = ('texts/euc-kr', 'texts/euc-kr.utf-8') errortests = ( 1.8 +3 -2 KoreanCodecs/test/test_iso_2022_kr.py Index: test_iso_2022_kr.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_iso_2022_kr.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- test_iso_2022_kr.py 12 Jan 2003 22:54:13 -0000 1.7 +++ test_iso_2022_kr.py 13 Jan 2003 08:43:48 -0000 1.8 @@ -16,12 +16,13 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: test_iso_2022_kr.py,v 1.7 2003/01/12 22:54:13 perky Exp $ +# $Id: test_iso_2022_kr.py,v 1.8 2003/01/13 08:43:48 perky Exp $ # import CodecTestBase -class TestISO_2022_KR(CodecTestBase.CodecTestBase): +class TestISO_2022_KR(CodecTestBase.TestCodecErrorCallback, + CodecTestBase.CodecTestBase): encoding = 'korean.iso-2022-kr' textfile_chunk = ('texts/iso-2022-kr.roundrobin', 'texts/iso-2022-kr.utf-8') 1.7 +4 -2 KoreanCodecs/test/test_mackorean.py Index: test_mackorean.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_mackorean.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- test_mackorean.py 12 Jan 2003 23:04:56 -0000 1.6 +++ test_mackorean.py 13 Jan 2003 08:43:48 -0000 1.7 @@ -16,7 +16,7 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: test_mackorean.py,v 1.6 2003/01/12 23:04:56 perky Exp $ +# $Id: test_mackorean.py,v 1.7 2003/01/13 08:43:48 perky Exp $ # import CodecTestBase @@ -24,7 +24,9 @@ def unichrs(s): return u''.join(map(unichr, map(eval, s.split('+')))) -class TestMacKorean(CodecTestBase.TestStreamReader, CodecTestBase.CodecTestBase): +class TestMacKorean(CodecTestBase.TestCodecErrorCallback, + CodecTestBase.TestStreamReader, + CodecTestBase.CodecTestBase): encoding = 'korean.mac_korean' textfile_chunk = ('texts/mackorean', 'texts/mackorean.utf-8') errortests = ( 1.6 +3 -2 KoreanCodecs/test/test_qwerty2bul.py Index: test_qwerty2bul.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_qwerty2bul.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- test_qwerty2bul.py 12 Jan 2003 22:54:13 -0000 1.5 +++ test_qwerty2bul.py 13 Jan 2003 08:43:48 -0000 1.6 @@ -16,12 +16,13 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: test_qwerty2bul.py,v 1.5 2003/01/12 22:54:13 perky Exp $ +# $Id: test_qwerty2bul.py,v 1.6 2003/01/13 08:43:48 perky Exp $ # import CodecTestBase -class TestQWERTY2BUL(CodecTestBase.CodecTestBase): +class TestQWERTY2BUL(CodecTestBase.TestCodecErrorCallback, + CodecTestBase.CodecTestBase): encoding = 'korean.qwerty2bul' errortests = ( # invalid bytes 1.4 +3 -2 KoreanCodecs/test/test_unijohab.py Index: test_unijohab.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_unijohab.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- test_unijohab.py 12 Jan 2003 22:54:13 -0000 1.3 +++ test_unijohab.py 13 Jan 2003 08:43:48 -0000 1.4 @@ -16,12 +16,13 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: test_unijohab.py,v 1.3 2003/01/12 22:54:13 perky Exp $ +# $Id: test_unijohab.py,v 1.4 2003/01/13 08:43:48 perky Exp $ # import CodecTestBase -class TestUNIJOHAB(CodecTestBase.CodecTestBase): +class TestUNIJOHAB(CodecTestBase.TestCodecErrorCallback, + CodecTestBase.CodecTestBase): encoding = 'korean.unijohab' errortests = () # error handling is relying UTF-8 codec. |