[Zope3-checkins] CVS: Zope3/src/zope/interface/common/tests - basemapping.py:1.3

Jim Fulton jim@zope.com
Mon, 3 Feb 2003 09:58:48 -0500


Update of /cvs-repository/Zope3/src/zope/interface/common/tests
In directory cvs.zope.org:/tmp/cvs-serv14618

Modified Files:
	basemapping.py 
Log Message:
Added __iter__ method.


=== Zope3/src/zope/interface/common/tests/basemapping.py 1.2 => 1.3 ===
--- Zope3/src/zope/interface/common/tests/basemapping.py:1.2	Wed Dec 25 09:15:11 2002
+++ Zope3/src/zope/interface/common/tests/basemapping.py	Mon Feb  3 09:58:46 2003
@@ -38,6 +38,12 @@
     state_keys = list(state.keys()) ; state_keys.sort()
     self.assertEqual(inst_keys, state_keys)
 
+def test_iter(self, inst, state):
+    # Return the keys of the mapping object
+    inst_keys = list(inst); inst_keys.sort()
+    state_keys = list(state.keys()) ; state_keys.sort()
+    self.assertEqual(inst_keys, state_keys)
+
 def test_values(self, inst, state):
     # Return the values of the mapping object
     inst_values = list(inst.values()); inst_values.sort()
@@ -82,6 +88,12 @@
         inst = self._IEnumerableMapping__sample()
         state = self._IEnumerableMapping__stateDict()
         test_values(self, inst, state)
+
+    def test_values(self):
+        # Return the values of the mapping object
+        inst = self._IEnumerableMapping__sample()
+        state = self._IEnumerableMapping__stateDict()
+        test_iter(self, inst, state)
 
     def test_items(self):
         # Return the items of the mapping object