Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Kirill Smelkov
ZEO
Commits
28432475
Commit
28432475
authored
Oct 05, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that a storage's values persist across open and close.
parent
457eb2da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
src/ZODB/tests/PersistentStorage.py
src/ZODB/tests/PersistentStorage.py
+42
-0
No files found.
src/ZODB/tests/PersistentStorage.py
0 → 100644
View file @
28432475
"""Test that a storage's values persist across open and close."""
class
PersistentStorage
:
def
checkUpdatesPersist
(
self
):
oids
=
[]
def
new_oid_wrapper
(
l
=
oids
,
new_oid
=
self
.
_storage
.
new_oid
):
oid
=
new_oid
()
l
.
append
(
oid
)
return
oid
self
.
_storage
.
new_oid
=
new_oid_wrapper
self
.
_dostore
()
self
.
_dostore
(
'a'
)
oid
=
self
.
_storage
.
new_oid
()
revid
=
self
.
_dostore
(
oid
)
self
.
_dostore
(
oid
,
revid
,
data
=
8
,
version
=
'b'
)
oid
=
self
.
_storage
.
new_oid
()
revid
=
self
.
_dostore
(
oid
,
data
=
1
)
revid
=
self
.
_dostore
(
oid
,
revid
,
data
=
2
)
self
.
_dostore
(
oid
,
revid
,
data
=
3
)
# keep copies of all the objects
objects
=
[]
for
oid
in
oids
:
p
,
s
=
self
.
_storage
.
load
(
oid
,
''
)
objects
.
append
((
oid
,
''
,
p
,
s
))
ver
=
self
.
_storage
.
modifiedInVersion
(
oid
)
if
ver
:
p
,
s
=
self
.
_storage
.
load
(
oid
,
ver
)
objects
.
append
((
oid
,
ver
,
p
,
s
))
self
.
_storage
.
close
()
self
.
open
()
# keep copies of all the objects
for
oid
,
ver
,
p
,
s
in
objects
:
_p
,
_s
=
self
.
_storage
.
load
(
oid
,
ver
)
self
.
assertEquals
(
p
,
_p
)
self
.
assertEquals
(
s
,
_s
)
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