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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
175b5a5a
Commit
175b5a5a
authored
Feb 07, 2001
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checked in persistence tests.
parent
9b4e4b08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
1 deletion
+58
-1
src/BTrees/tests/testBTrees.py
src/BTrees/tests/testBTrees.py
+58
-1
No files found.
src/BTrees/tests/testBTrees.py
View file @
175b5a5a
...
@@ -416,7 +416,64 @@ class Base:
...
@@ -416,7 +416,64 @@ class Base:
assert
t
.
insert
(
1
,
1
)
==
1
assert
t
.
insert
(
1
,
1
)
==
1
assert
lsubtract
(
list
(
t
.
keys
()),
[
0
,
1
])
==
[]
assert
lsubtract
(
list
(
t
.
keys
()),
[
0
,
1
])
==
[]
def
_getRoot
(
self
):
from
ZODB.FileStorage
import
FileStorage
from
ZODB.DB
import
DB
n
=
'fs_tmp__%s'
%
os
.
getpid
()
s
=
FileStorage
(
n
)
db
=
DB
(
s
)
root
=
db
.
open
().
root
()
return
root
def
_closeDB
(
self
,
root
):
root
.
_p_jar
.
_db
.
close
()
root
=
None
def
_delDB
(
self
):
os
.
system
(
'rm fs_tmp__*'
)
def
testLoadAndStore
(
self
):
t
=
self
.
t
try
:
root
=
self
.
_getRoot
()
root
[
't'
]
=
t
get_transaction
().
commit
()
except
:
self
.
_closeDB
(
root
)
self
.
_delDB
()
raise
self
.
_closeDB
(
root
)
try
:
root
=
self
.
_getRoot
()
assert
root
[
't'
]
==
t
finally
:
self
.
_closeDB
(
root
)
self
.
_delDB
()
def
testGhostUnghost
(
self
):
t
=
self
.
t
try
:
root
=
self
.
_getRoot
()
root
[
't'
]
=
t
get_transaction
().
commit
()
except
:
self
.
_closeDB
(
root
)
self
.
_delDB
()
raise
self
.
_closeDB
(
root
)
try
:
root
=
self
.
_getRoot
()
root
[
't'
].
_p_changed
=
None
get_transaction
().
commit
()
assert
root
[
't'
]
==
t
finally
:
self
.
_closeDB
(
root
)
self
.
_delDB
()
class
TestIOBTrees
(
Base
,
TestCase
):
class
TestIOBTrees
(
Base
,
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
t
=
IOBTree
()
self
.
t
=
IOBTree
()
...
...
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