[Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.31,1.31.6.1
Tim Peters
tim_one@users.sourceforge.net
2001年7月06日 00:01:33 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Lib codecs.py,1.16,1.16.6.1
- Next message: [Python-checkins] CVS: python/dist/src/Lib/encodings aliases.py,1.4,1.4.8.1 cp037.py,1.2,1.2.6.1 cp1006.py,1.2,1.2.6.1 cp1026.py,1.2,1.2.6.1 cp1250.py,1.2,1.2.6.1 cp1251.py,1.2,1.2.6.1 cp1252.py,1.2,1.2.6.1 cp1253.py,1.2,1.2.6.1 cp1254.py,1.2,1.2.6.1 cp1255.py,1.2,1.2.6.1 cp1256.py,1.2,1.2.6.1 cp1257.py,1.2,1.2.6.1 cp1258.py,1.2,1.2.6.1 cp424.py,1.2,1.2.6.1 cp437.py,1.2,1.2.6.1 cp500.py,1.2,1.2.6.1 cp737.py,1.2,1.2.6.1 cp775.py,1.2,1.2.6.1 cp850.py,1.2,1.2.6.1 cp852.py,1.2,1.2.6.1 cp855.py,1.2,1.2.6.1 cp856.py,1.3,1.3.6.1 cp857.py,1.2,1.2.6.1 cp860.py,1.2,1.2.6.1 cp861.py,1.2,1.2.6.1 cp862.py,1.2,1.2.6.1 cp863.py,1.2,1.2.6.1 cp864.py,1.2,1.2.6.1 cp865.py,1.2,1.2.6.1 cp866.py,1.2,1.2.6.1 cp869.py,1.2,1.2.6.1 cp874.py,1.2,1.2.6.1 cp875.py,1.2,1.2.6.1 iso8859_1.py,1.2,1.2.6.1 iso8859_10.py,1.2,1.2.6.1 iso8859_13.py,1.2,1.2.6.1 iso8859_14.py,1.2,1.2.6.1 iso8859_15.py,1.2,1.2.6.1 iso8859_2.py,1.2,1.2.6.1 iso8859_3.py,1.2,1.2.6.1 iso8859_4.py,1.2,1.2.6.1 iso8859_5.py,1.2,1.2.6.1 iso8859_6.py,1.2,1.2.6.1 iso8859_7.py,1.2,1.2.6.1 iso8859_8.py,1.2,1.2.6.1 iso8859_9.py,1.2,1.2.6.1 koi8_r.py,1.2,1.2.6.1 mac_cyrillic.py,1.2,1.2.6.1 mac_greek.py,1.2,1.2.6.1 mac_iceland.py,1.2,1.2.6.1 mac_latin2.py,1.2,1.2.6.1 mac_roman.py,1.2,1.2.6.1 mac_turkish.py,1.2,1.2.6.1 utf_16.py,1.1,1.1.10.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv9655/descr/dist/src/Lib/test
Modified Files:
Tag: descr-branch
test_unicode.py
Log Message:
THought I'd start the merge with something "obviously easy". Heh.
One thing leads to another, and test_unicode.py fails now. But it's due
to this bug:
>>> "%*s" % (5, "abc")
' abc'
>>> "%*s" % (5, u"abc")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: * wants int
>>>
This *form* of test (a %*s format) didn't used to exist in test_unicode.py,
so my best guess is that this is a legit bug in the descr-branch. If so,
no reason not to check this in; perhaps the true error is somewhere in
still untouched Unicode-specific merges, though.
Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.31
retrieving revision 1.31.6.1
diff -C2 -r1.31 -r1.31.6.1
*** test_unicode.py 2001年02月10日 14:09:31 1.31
--- test_unicode.py 2001年07月06日 07:01:30 1.31.6.1
***************
*** 6,10 ****
"""#"
! from test_support import verify, verbose
import sys
--- 6,10 ----
"""#"
! from test_support import verify, verbose, TestFailed
import sys
***************
*** 367,370 ****
--- 367,376 ----
verify('...%%...%%s...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...%...%s...1...2...3...abc...')
verify('...%s...' % u"abc" == u'...abc...')
+ verify('%*s' % (5,u'abc',) == u' abc')
+ verify('%*s' % (-5,u'abc',) == u'abc ')
+ verify('%*.*s' % (5,2,u'abc',) == u' ab')
+ verify('%*.*s' % (5,3,u'abc',) == u' abc')
+ verify('%i %*.*s' % (10, 5,3,u'abc',) == u'10 abc')
+ verify('%i%s %*.*s' % (10, 3, 5,3,u'abc',) == u'103 abc')
print 'done.'
***************
*** 381,387 ****
# UTF-8 specific decoding tests
verify(unicode(''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))),
! 'utf-8') == u'\ud84d\udc56' )
verify(unicode(''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))),
! 'utf-8') == u'\ud800\udc02' )
verify(unicode(''.join((chr(0xe2), chr(0x82), chr(0xac))),
'utf-8') == u'\u20ac' )
--- 387,393 ----
# UTF-8 specific decoding tests
verify(unicode(''.join((chr(0xf0), chr(0xa3), chr(0x91), chr(0x96))),
! 'utf-8') == u'\U00023456' )
verify(unicode(''.join((chr(0xf0), chr(0x90), chr(0x80), chr(0x82))),
! 'utf-8') == u'\U00010002' )
verify(unicode(''.join((chr(0xe2), chr(0x82), chr(0xac))),
'utf-8') == u'\u20ac' )
***************
*** 488,495 ****
'mac_greek', 'mac_iceland','mac_roman', 'mac_turkish',
! 'cp1006', 'cp875', 'iso8859_8',
### These have undefined mappings:
#'cp424',
):
--- 494,504 ----
'mac_greek', 'mac_iceland','mac_roman', 'mac_turkish',
! 'cp1006', 'iso8859_8',
### These have undefined mappings:
#'cp424',
+
+ ### These fail the round-trip:
+ #'cp875'
):
- Previous message: [Python-checkins] CVS: python/dist/src/Lib codecs.py,1.16,1.16.6.1
- Next message: [Python-checkins] CVS: python/dist/src/Lib/encodings aliases.py,1.4,1.4.8.1 cp037.py,1.2,1.2.6.1 cp1006.py,1.2,1.2.6.1 cp1026.py,1.2,1.2.6.1 cp1250.py,1.2,1.2.6.1 cp1251.py,1.2,1.2.6.1 cp1252.py,1.2,1.2.6.1 cp1253.py,1.2,1.2.6.1 cp1254.py,1.2,1.2.6.1 cp1255.py,1.2,1.2.6.1 cp1256.py,1.2,1.2.6.1 cp1257.py,1.2,1.2.6.1 cp1258.py,1.2,1.2.6.1 cp424.py,1.2,1.2.6.1 cp437.py,1.2,1.2.6.1 cp500.py,1.2,1.2.6.1 cp737.py,1.2,1.2.6.1 cp775.py,1.2,1.2.6.1 cp850.py,1.2,1.2.6.1 cp852.py,1.2,1.2.6.1 cp855.py,1.2,1.2.6.1 cp856.py,1.3,1.3.6.1 cp857.py,1.2,1.2.6.1 cp860.py,1.2,1.2.6.1 cp861.py,1.2,1.2.6.1 cp862.py,1.2,1.2.6.1 cp863.py,1.2,1.2.6.1 cp864.py,1.2,1.2.6.1 cp865.py,1.2,1.2.6.1 cp866.py,1.2,1.2.6.1 cp869.py,1.2,1.2.6.1 cp874.py,1.2,1.2.6.1 cp875.py,1.2,1.2.6.1 iso8859_1.py,1.2,1.2.6.1 iso8859_10.py,1.2,1.2.6.1 iso8859_13.py,1.2,1.2.6.1 iso8859_14.py,1.2,1.2.6.1 iso8859_15.py,1.2,1.2.6.1 iso8859_2.py,1.2,1.2.6.1 iso8859_3.py,1.2,1.2.6.1 iso8859_4.py,1.2,1.2.6.1 iso8859_5.py,1.2,1.2.6.1 iso8859_6.py,1.2,1.2.6.1 iso8859_7.py,1.2,1.2.6.1 iso8859_8.py,1.2,1.2.6.1 iso8859_9.py,1.2,1.2.6.1 koi8_r.py,1.2,1.2.6.1 mac_cyrillic.py,1.2,1.2.6.1 mac_greek.py,1.2,1.2.6.1 mac_iceland.py,1.2,1.2.6.1 mac_latin2.py,1.2,1.2.6.1 mac_roman.py,1.2,1.2.6.1 mac_turkish.py,1.2,1.2.6.1 utf_16.py,1.1,1.1.10.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]