[Zodb-checkins] CVS: Zope3/src/zodb/storage/tests - undoversion.py:1.3.4.1

Jeremy Hylton jeremy@zope.com
Mon, 10 Mar 2003 17:44:16 -0500


Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv18698/storage/tests

Modified Files:
      Tag: opaque-pickles-branch
	undoversion.py 
Log Message:
Add notes to several transactions.
Change some assert == to assertEquals.


=== Zope3/src/zodb/storage/tests/undoversion.py 1.3 => 1.3.4.1 ===
--- Zope3/src/zodb/storage/tests/undoversion.py:1.3	Wed Feb  5 18:28:27 2003
+++ Zope3/src/zodb/storage/tests/undoversion.py	Mon Mar 10 17:44:13 2003
@@ -28,13 +28,16 @@
                                 version=version)
         revid_c = self._dostore(oid, revid=revid_b, data=MinPO(93),
                                 version=version)
+
         info=self._storage.undoInfo()
         tid=info[0]['id']
         t = Transaction()
+        t.note("undo last revision (93)")
         self._storage.tpcBegin(t)
         oids = self._storage.undo(tid, t)
         self._storage.tpcVote(t)
         self._storage.tpcFinish(t)
+
         assert len(oids) == 1
         assert oids[0] == oid
         data, revid = self._storage.load(oid, '')
@@ -45,10 +48,12 @@
         assert zodb_unpickle(data) == MinPO(92)
         # Now commit the version...
         t = Transaction()
+        t.note("commit version")
         self._storage.tpcBegin(t)
         oids = self._storage.commitVersion(version, '', t)
         self._storage.tpcVote(t)
         self._storage.tpcFinish(t)
+
         assert len(oids) == 1
         assert oids[0] == oid
 
@@ -60,16 +65,18 @@
         info=self._storage.undoInfo()
         tid=info[0]['id']
         t = Transaction()
+        t.note("undo commit version")
         self._storage.tpcBegin(t)
         oids = self._storage.undo(tid, t)
         self._storage.tpcVote(t)
         self._storage.tpcFinish(t)
+
         assert len(oids) == 1
         assert oids[0] == oid
         data, revid = self._storage.load(oid, version)
-        assert zodb_unpickle(data) == MinPO(92)
+        self.assertEqual(zodb_unpickle(data), MinPO(92))
         data, revid = self._storage.load(oid, '')
-        assert zodb_unpickle(data) == MinPO(91)
+        self.assertEqual(zodb_unpickle(data), MinPO(91))
         # Now abort the version
         t = Transaction()
         self._storage.tpcBegin(t)