[Python-checkins] python/dist/src/Lib/test test_builtin.py,1.3,1.4
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sat, 25 Jan 2003 14:46:13 -0800
- Previous message: [Python-checkins] python/dist/src/Modules/expat internal.h,NONE,1.1 ascii.h,1.1.1.1,1.2 expat.h,1.3,1.4 xmlparse.c,1.2,1.3 xmlrole.c,1.3,1.4 xmlrole.h,1.1.1.1,1.2 xmltok.c,1.2,1.3 xmltok.h,1.1.1.1,1.2 xmltok_impl.c,1.1.1.1,1.2 xmltok_ns.c,1.1.1.1,1.2
- Next message: [Python-checkins] python/dist/src/Misc NEWS,1.624,1.625
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv753/Lib/test
Modified Files:
test_builtin.py
Log Message:
Patch #636005: Filter unicode into unicode.
Index: test_builtin.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_builtin.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_builtin.py 19 Jan 2003 16:23:58 -0000 1.3
--- test_builtin.py 25 Jan 2003 22:46:11 -0000 1.4
***************
*** 366,369 ****
--- 366,375 ----
raise ValueError
self.assertRaises(ValueError, filter, lambda x: x >="3", badstr("1234"))
+ if have_unicode:
+ # test biltinmodule.c::filterstring()
+ self.assertEqual(filter(None, unicode("12")), unicode("12"))
+ self.assertEqual(filter(lambda x: x>="3", unicode("1234")), unicode("34"))
+ self.assertRaises(TypeError, filter, 42, unicode("12"))
+ self.assertRaises(ValueError, filter, lambda x: x >="3", badstr(unicode("1234")))
def test_float(self):
- Previous message: [Python-checkins] python/dist/src/Modules/expat internal.h,NONE,1.1 ascii.h,1.1.1.1,1.2 expat.h,1.3,1.4 xmlparse.c,1.2,1.3 xmlrole.c,1.3,1.4 xmlrole.h,1.1.1.1,1.2 xmltok.c,1.2,1.3 xmltok.h,1.1.1.1,1.2 xmltok_impl.c,1.1.1.1,1.2 xmltok_ns.c,1.1.1.1,1.2
- Next message: [Python-checkins] python/dist/src/Misc NEWS,1.624,1.625
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]