[Python-checkins] python/dist/src/Lib/test test_builtin.py, 1.32,
1.33
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sat Aug 7 06:55:32 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16012/Lib/test
Modified Files:
test_builtin.py
Log Message:
SF bug #1004669: Type returned from .keys() is not checked
Index: test_builtin.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_builtin.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** test_builtin.py 2 Aug 2004 08:30:07 -0000 1.32
--- test_builtin.py 7 Aug 2004 04:55:30 -0000 1.33
***************
*** 323,326 ****
--- 323,335 ----
self.assertEqual(ss['a3'], 210)
+ # Verify that dir() catches a non-list returned by eval
+ # SF bug #1004669
+ class C:
+ def __getitem__(self, item):
+ raise KeyError(item)
+ def keys(self):
+ return 'a'
+ self.assertRaises(TypeError, eval, 'dir()', globals(), C())
+
# Done outside of the method test_z to get the correct scope
z = 0
More information about the Python-checkins
mailing list