[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/tests/PackableStorage.py Fixed a pack test that was not compatible with storages that always

Shane Hathaway shane at hathawaymix.org
Fri Dec 12 21:20:02 EST 2008


Log message for revision 94011:
  Fixed a pack test that was not compatible with storages that always
  return an object count of 0.
  

Changed:
  U   ZODB/trunk/src/ZODB/tests/PackableStorage.py

-=-
Modified: ZODB/trunk/src/ZODB/tests/PackableStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/PackableStorage.py	2008-12-13 02:18:41 UTC (rev 94010)
+++ ZODB/trunk/src/ZODB/tests/PackableStorage.py	2008-12-13 02:20:01 UTC (rev 94011)
@@ -312,7 +312,8 @@
         root[2] = conn.get_connection('o').root()
         transaction.commit()
         db.pack(time.time()+1)
-        self.assertEqual(len(self._storage), 1)
+        # some valid storages always return 0 for len()
+        self.assertTrue(len(self._storage) in (0, 1))
 
     def checkPackAllRevisions(self):
         self._initroot()



More information about the Zodb-checkins mailing list