[Zope-Checkins] CVS: ZODB3/ZODB/tests - VersionStorage.py:1.25.2.3

Jeremy Hylton cvs-admin at zope.org
Tue Nov 11 23:32:08 EST 2003


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv20243

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	VersionStorage.py 
Log Message:
Remove the last of the very-old #JF# comments.


=== ZODB3/ZODB/tests/VersionStorage.py 1.25.2.2 => 1.25.2.3 ===
--- ZODB3/ZODB/tests/VersionStorage.py:1.25.2.2	Tue Nov 11 23:30:45 2003
+++ ZODB3/ZODB/tests/VersionStorage.py	Tue Nov 11 23:32:08 2003
@@ -16,10 +16,6 @@
 Any storage that supports versions should be able to pass all these tests.
 """
 
-# XXX we should clean this code up to get rid of the #JF# comments.
-# They were introduced when Jim reviewed the original version of the
-# code.  Barry and Jeremy didn't understand versions then.
-
 import time
 
 from ZODB import POSException
@@ -108,11 +104,6 @@
         self.assertRaises(KeyError,
                           self._storage.load,
                           self._storage.new_oid(), '')
-        # Try to load a bogus version string
-        #JF# Nope, fall back to non-version
-        #JF# self.assertRaises(KeyError,
-        #JF#                   self._storage.load,
-        #JF#                   oid, 'bogus')
         data, revid = self._storage.load(oid, 'bogus')
         self.assertEqual(zodb_unpickle(data), MinPO(11))
 
@@ -131,9 +122,6 @@
     def checkVersionEmpty(self):
         # Before we store anything, these versions ought to be empty
         version = 'test-version'
-        #JF# The empty string is not a valid version. I think that this should
-        #JF# be an error. Let's punt for now.
-        #JF# assert self._storage.versionEmpty('')
         self.failUnless(self._storage.versionEmpty(version))
         # Now store some objects
         oid = self._storage.new_oid()
@@ -144,10 +132,6 @@
         revid = self._dostore(oid, revid=revid, data=MinPO(14),
                               version=version)
         # The blank version should not be empty
-        #JF# The empty string is not a valid version. I think that this should
-        #JF# be an error. Let's punt for now.
-        #JF# assert not self._storage.versionEmpty('')
-
         # Neither should 'test-version'
         self.failUnless(not self._storage.versionEmpty(version))
         # But this non-existant version should be empty
@@ -345,13 +329,8 @@
         data, revid = self._storage.load(oid1, '')
         eq(zodb_unpickle(data), MinPO(51))
 
-        #JF# Ditto
-        #JF# self.assertRaises(POSException.VersionError,
-        #JF#                   self._storage.load, oid1, version1)
         data, revid = self._storage.load(oid1, '')
         eq(zodb_unpickle(data), MinPO(51))
-        #JF# self.assertRaises(POSException.VersionError,
-        #JF#                   self._storage.load, oid1, version2)
         data, revid = self._storage.load(oid1, '')
         eq(zodb_unpickle(data), MinPO(51))
 
@@ -372,7 +351,6 @@
         data, revid = self._storage.load(oid2, version2)
         eq(zodb_unpickle(data), MinPO(54))
 
-        #JF# To do a test like you want, you have to add the data in a version
         oid = self._storage.new_oid()
         revid = self._dostore(oid, revid=revid, data=MinPO(54), version='one')
         self.assertRaises(KeyError,




More information about the Zope-Checkins mailing list