[KoCo-CVS] [Commit] KoreanCodecs/test test_cp949.py test_mackorean.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-01-11 15:01:58
|
perky 03/01/11 07:01:57 Modified: test test_cp949.py test_mackorean.py Log: Don't retrieve mapping file automatically, give a chance to user. Revision Changes Path 1.11 +8 -7 KoreanCodecs/test/test_cp949.py Index: test_cp949.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_cp949.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- test_cp949.py 10 Jan 2003 04:29:34 -0000 1.10 +++ test_cp949.py 11 Jan 2003 15:01:56 -0000 1.11 @@ -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.10 2003/01/10 04:29:34 perky Exp $ +# $Id: test_cp949.py,v 1.11 2003/01/11 15:01:56 perky Exp $ # import CodecTestBase @@ -38,15 +38,16 @@ ) def test_mapping(self): - import sys, os, urllib + import sys, os - if not os.access('map-cp949.txt', os.R_OK): - sys.stdout.write('(Trying to download cp949 mapping) ') + if not os.access('CP949.TXT', os.R_OK): + sys.stdout.write('skipped -- CP949.TXT not found, download from' + ' http://www.unicode.org/Public/MAPPINGS' + '/VENDORS/MICSFT/WINDOWS/CP949.TXT ') sys.stdout.flush() - urllib.urlretrieve('http://www.unicode.org/Public/MAPPINGS' - '/VENDORS/MICSFT/WINDOWS/CP949.TXT', 'map-cp949.txt') + return - for line in open('map-cp949.txt'): + for line in open('CP949.TXT'): if not line: break data = line.split('#')[0].strip().split() 1.4 +8 -7 KoreanCodecs/test/test_mackorean.py Index: test_mackorean.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_mackorean.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- test_mackorean.py 10 Jan 2003 04:29:34 -0000 1.3 +++ test_mackorean.py 11 Jan 2003 15:01:56 -0000 1.4 @@ -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.3 2003/01/10 04:29:34 perky Exp $ +# $Id: test_mackorean.py,v 1.4 2003/01/11 15:01:56 perky Exp $ # import CodecTestBase @@ -40,15 +40,16 @@ ) def test_mapping(self): - import os, urllib, sys + import os, sys - if not os.access('map-mackorean.txt', os.R_OK): - sys.stdout.write('(Trying to download MacKorean mapping) ') + if not os.access('KOREAN.TXT', os.R_OK): + sys.stdout.write('skipped -- KOREAN.TXT not found, download from' + ' http://www.unicode.org/Public/MAPPINGS' + '/VENDORS/APPLE/KOREAN.TXT ') sys.stdout.flush() - urllib.urlretrieve('http://www.unicode.org/Public/MAPPINGS' - '/VENDORS/APPLE/KOREAN.TXT', 'map-mackorean.txt') + return - for line in open('map-mackorean.txt'): + for line in open('KOREAN.TXT'): if not line: break data = line.split('#')[0].strip().split() |