Commit 2f678b3e authored by Jeremy Hylton's avatar Jeremy Hylton

Reflow long lines.

parent d297bdd9
...@@ -403,10 +403,13 @@ class PackableStorage(PackableStorageBase): ...@@ -403,10 +403,13 @@ class PackableStorage(PackableStorageBase):
self.assertEqual(1,len(self._storage.undoLog())) self.assertEqual(1,len(self._storage.undoLog()))
def dont_checkPackUndoLogUndoable(self): def dont_checkPackUndoLogUndoable(self):
# A disabled test. I wanted to test that the content of the undo log was consistent, # A disabled test. I wanted to test that the content of the
# but every storage appears to include something slightly different. If the result of # undo log was consistent, but every storage appears to
# this method is only used to fill a GUI then this difference doesnt matter. # include something slightly different. If the result of this
# Perhaps re-enable this test once we agree what should be asserted. # method is only used to fill a GUI then this difference
# doesnt matter. Perhaps re-enable this test once we agree
# what should be asserted.
self._initroot() self._initroot()
# Create two `persistent' object # Create two `persistent' object
obj1 = self._newobj() obj1 = self._newobj()
...@@ -415,21 +418,28 @@ class PackableStorage(PackableStorageBase): ...@@ -415,21 +418,28 @@ class PackableStorage(PackableStorageBase):
obj2 = self._newobj() obj2 = self._newobj()
oid2 = obj2.getoid() oid2 = obj2.getoid()
obj2.value = 2 obj2.value = 2
# Commit the first revision of each of them # Commit the first revision of each of them
revid11 = self._dostoreNP(oid1, data=pickle.dumps(obj1), description="1-1") revid11 = self._dostoreNP(oid1, data=pickle.dumps(obj1),
revid22 = self._dostoreNP(oid2, data=pickle.dumps(obj2), description="2-2") description="1-1")
revid22 = self._dostoreNP(oid2, data=pickle.dumps(obj2),
description="2-2")
# remember the time. everything above here will be packed away # remember the time. everything above here will be packed away
now = packtime = time.time() snooze()
while packtime <= now:
packtime = time.time() packtime = time.time()
snooze()
# Commit two revisions of the first object # Commit two revisions of the first object
obj1.value = 3 obj1.value = 3
revid13 = self._dostoreNP(oid1, revid=revid11, data=pickle.dumps(obj1), description="1-3") revid13 = self._dostoreNP(oid1, revid=revid11,
data=pickle.dumps(obj1), description="1-3")
obj1.value = 4 obj1.value = 4
revid14 = self._dostoreNP(oid1, revid=revid13, data=pickle.dumps(obj1), description="1-4") revid14 = self._dostoreNP(oid1, revid=revid13,
data=pickle.dumps(obj1), description="1-4")
# Commit one revision of the second object # Commit one revision of the second object
obj2.value = 5 obj2.value = 5
revid25 = self._dostoreNP(oid2, revid=revid22, data=pickle.dumps(obj2), description="2-5") revid25 = self._dostoreNP(oid2, revid=revid22,
data=pickle.dumps(obj2), description="2-5")
# Now pack # Now pack
self.assertEqual(6,len(self._storage.undoLog())) self.assertEqual(6,len(self._storage.undoLog()))
print '\ninitial undoLog was' print '\ninitial undoLog was'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment