[Python-checkins] CVS: python/dist/src/Lib/test test_types.py,1.15,1.16

Moshe Zadka python-dev@python.org
Thu, 30 Nov 2000 04:31:08 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21539/Lib/test

Modified Files:
	test_types.py 
Log Message:
Added .first{item,value,key}() to dictionaries.
Complete with docos and tests.
OKed by Guido.


Index: test_types.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_types.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** test_types.py	2000/10/23 17:22:08	1.15
--- test_types.py	2000/11/30 12:31:03	1.16
***************
*** 266,267 ****
--- 266,273 ----
  if len(d['key']) <> 2:
      raise TestFailed, 'present {} setdefault, w/ 2nd arg'
+ if d.keys()[0] != d.firstkey():
+     raise TestFailed, 'first key is not first in keys'
+ if d.values()[0] != d.firstvalue():
+     raise TestFailed, 'first value is not first in values'
+ if d.items()[0] != d.firstitem():
+     raise TestFailed, 'first item is not first in items'