[KoCo-CVS] [Commit] KoreanCodecs/test test_cp949.py test_mackorean.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-01-10 04:26:44
|
perky 03/01/09 20:26:43 Modified: test test_cp949.py test_mackorean.py Log: Fetch mapping files from unicode.org site. Revision Changes Path 1.9 +10 -2 KoreanCodecs/test/test_cp949.py Index: test_cp949.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_cp949.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- test_cp949.py 10 Jan 2003 03:15:25 -0000 1.8 +++ test_cp949.py 10 Jan 2003 04:26:43 -0000 1.9 @@ -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.8 2003/01/10 03:15:25 perky Exp $ +# $Id: test_cp949.py,v 1.9 2003/01/10 04:26:43 perky Exp $ # import CodecTestBase @@ -38,7 +38,15 @@ ) def test_mapping(self): - for line in open('mappings/cp949.txt'): + import sys, os, urllib + + if not os.access('map-cp949.txt', os.R_OK): + sys.stdout.write('(Trying to download cp949 mapping) ') + sys.stdout.flush() + urllib.urlretrieve('http://www.unicode.org/Public/MAPPINGS' + '/VENDORS/MICSFT/WINDOWS/CP949.TXT', 'map-cp949.txt') + + for line in open('map-cp949.txt'): if not line: break data = line.split('#')[0].strip().split() 1.2 +10 -2 KoreanCodecs/test/test_mackorean.py Index: test_mackorean.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/test/test_mackorean.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test_mackorean.py 10 Jan 2003 03:15:25 -0000 1.1 +++ test_mackorean.py 10 Jan 2003 04:26:43 -0000 1.2 @@ -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.1 2003/01/10 03:15:25 perky Exp $ +# $Id: test_mackorean.py,v 1.2 2003/01/10 04:26:43 perky Exp $ # import CodecTestBase @@ -40,7 +40,15 @@ ) def test_mapping(self): - for line in open('mappings/MacKorean.txt'): + import os, urllib, sys + + if not os.access('map-mackorean.txt', os.R_OK): + sys.stdout.write('(Trying to download MacKorean mapping) ') + sys.stdout.flush() + urllib.urlretrieve('http://www.unicode.org/Public/MAPPINGS' + '/VENDORS/APPLE/KOREAN.TXT', 'map-mackorean.txt') + + for line in open('map-mackorean.txt'): if not line: break data = line.split('#')[0].strip().split() |