Update of /cvsroot/jython/bugtests
In directory usw-pr-cvs1:/tmp/cvs-serv3522
Modified Files:
test109.py test110.py
Log Message:
Iteration and 'in' in dicts now works.
Index: test109.py
===================================================================
RCS file: /cvsroot/jython/bugtests/test109.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test109.py 14 Jul 2001 18:17:28 -0000 1.1
--- test109.py 30 May 2002 19:25:35 -0000 1.2
***************
*** 5,14 ****
import support
! try:
! for x in {3:'d', 2:'c', 1:'b', 0:'a'}:
! print x,
! except TypeError, e:
! pass
! else:
! raise support.TestError("Looping over dict should fail")
--- 5,13 ----
import support
+ L = []
! for x in {3:'d', 2:'c', 1:'b', 0:'a'}:
! L.append(x)
! L.sort()
! if L != [0, 1, 2, 3]:
! support.TestError("Looping over dict should work")
Index: test110.py
===================================================================
RCS file: /cvsroot/jython/bugtests/test110.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test110.py 14 Jul 2001 18:17:28 -0000 1.1
--- test110.py 30 May 2002 19:25:35 -0000 1.2
***************
*** 5,12 ****
import support
! try:
! print 1 in {2:2, 3:3}
! except TypeError, e:
! pass
! else:
! raise support.TestError("in keyword an a dict should fail")
--- 5,10 ----
import support
! if 1 in {2:2, 3:3}:
! raise support.TestError("in keyword an a dict should work")
! if 2 not in {2:2, 3:3}:
! raise support.TestError("in keyword an a dict should work")
|