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
22315827
Commit
22315827
authored
May 30, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify checkGetSize() so that it works for TemporaryStorage and ZEO.
Remove comments out test.
parent
425d0d21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
21 deletions
+2
-21
src/ZODB/tests/BasicStorage.py
src/ZODB/tests/BasicStorage.py
+2
-21
No files found.
src/ZODB/tests/BasicStorage.py
View file @
22315827
...
...
@@ -198,13 +198,10 @@ class BasicStorage:
def
checkGetSize
(
self
):
self
.
_dostore
(
data
=
MinPO
(
25
))
# the size should be a byte count
size
=
self
.
_storage
.
getSize
()
# all Zope really cares about is that the size is printable
# The storage API doesn't make any claims about what size
# means except that it ought to be printable.
str
(
size
)
if
type
(
size
)
in
[
type
(
0
),
type
(
0L
),
type
(
0.0
)]:
# a numerical size - that means we can check that the size is reasonable.
self
.
assert_
(
10
<
size
<
100
*
1024
,
size
)
def
checkNote
(
self
):
oid
=
self
.
_storage
.
new_oid
()
...
...
@@ -215,22 +212,6 @@ class BasicStorage:
self
.
_storage
.
tpc_vote
(
t
)
self
.
_storage
.
tpc_finish
(
t
)
## def checkOversizeNote(self):
## oid = self._storage.new_oid()
## t = Transaction()
## # Most storages cant cope with comments this long
## t.note('0'*128*1024)
## try:
## self._storage.tpc_begin(t)
## self._storage.store(oid, ZERO, zodb_pickle(MinPO(5)), '', t)
## self._storage.tpc_vote(t)
## self._storage.tpc_finish(t)
## except POSException.POSError:
## # failed as expected
## pass
## else:
## self.fail()
def
checkGetExtensionMethods
(
self
):
m
=
self
.
_storage
.
getExtensionMethods
()
self
.
assertEqual
(
type
(
m
),
type
({}))
...
...
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