Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
2f678b3e
Commit
2f678b3e
authored
May 30, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflow long lines.
parent
d297bdd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
src/ZODB/tests/PackableStorage.py
src/ZODB/tests/PackableStorage.py
+22
-12
No files found.
src/ZODB/tests/PackableStorage.py
View file @
2f678b3e
...
...
@@ -403,10 +403,13 @@ class PackableStorage(PackableStorageBase):
self
.
assertEqual
(
1
,
len
(
self
.
_storage
.
undoLog
()))
def
dont_checkPackUndoLogUndoable
(
self
):
# A disabled test. I wanted to test that the content of the undo log was consistent,
# but every storage appears to include something slightly different. If the result of
# this 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.
# A disabled test. I wanted to test that the content of the
# undo log was consistent, but every storage appears to
# include something slightly different. If the result of this
# 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
()
# Create two `persistent' object
obj1
=
self
.
_newobj
()
...
...
@@ -415,21 +418,28 @@ class PackableStorage(PackableStorageBase):
obj2
=
self
.
_newobj
()
oid2
=
obj2
.
getoid
()
obj2
.
value
=
2
# Commit the first revision of each of them
revid11
=
self
.
_dostoreNP
(
oid1
,
data
=
pickle
.
dumps
(
obj1
),
description
=
"1-1"
)
revid22
=
self
.
_dostoreNP
(
oid2
,
data
=
pickle
.
dumps
(
obj2
),
description
=
"2-2"
)
revid11
=
self
.
_dostoreNP
(
oid1
,
data
=
pickle
.
dumps
(
obj1
),
description
=
"1-1"
)
revid22
=
self
.
_dostoreNP
(
oid2
,
data
=
pickle
.
dumps
(
obj2
),
description
=
"2-2"
)
# remember the time. everything above here will be packed away
now
=
packtime
=
time
.
time
()
while
packtime
<=
now
:
snooze
()
packtime
=
time
.
time
()
snooze
()
# Commit two revisions of the first object
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
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
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
self
.
assertEqual
(
6
,
len
(
self
.
_storage
.
undoLog
()))
print
'
\
n
initial undoLog was'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment