[Zodb-checkins] SVN: ZODB/branches/alienoid-btrees_pop/src/BTrees/tests/testBTrees.py more tests

Ruslan Spivak rspivak at nuxeo.com
Tue Aug 30 17:18:59 EDT 2005


Log message for revision 38173:
  more tests

Changed:
  U   ZODB/branches/alienoid-btrees_pop/src/BTrees/tests/testBTrees.py

-=-
Modified: ZODB/branches/alienoid-btrees_pop/src/BTrees/tests/testBTrees.py
===================================================================
--- ZODB/branches/alienoid-btrees_pop/src/BTrees/tests/testBTrees.py	2005-08-30 21:13:31 UTC (rev 38172)
+++ ZODB/branches/alienoid-btrees_pop/src/BTrees/tests/testBTrees.py	2005-08-30 21:18:59 UTC (rev 38173)
@@ -636,10 +636,20 @@
         self.assertRaises(KeyError, t.pop, 1)
 
         t[1] = 3
+        # KeyError when key is not in container and default is not passed
         self.assertRaises(KeyError, t.pop, 5)
+
         self.assertEqual(t.pop(1), 3)
         self.assertEqual(len(t), 0)
 
+        # Pop only one item
+        t[1] = 3
+        t[2] = 4
+        self.assertEqual(len(t), 2)
+        self.assertEqual(t.pop(1), 3)
+        self.assertEqual(len(t), 1)
+        self.assert_(t[2] == 4)
+
         self.assertEqual(t.pop(1, 3), 3)
 
 



More information about the Zodb-checkins mailing list