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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
b41613fe
Commit
b41613fe
authored
Feb 20, 2013
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo fixes
parent
7f626297
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
src/ZODB/tests/testConnection.py
src/ZODB/tests/testConnection.py
+12
-12
No files found.
src/ZODB/tests/testConnection.py
View file @
b41613fe
...
...
@@ -662,7 +662,7 @@ def doctest_proper_ghost_initialization_with_empty__p_deactivate():
def
doctest_readCurrent
():
r"""
The connection's readCurrent method is called to provide a higher
level of consistency in cases where an object i
f
read to compute an
level of consistency in cases where an object i
s
read to compute an
update to a separate object. When this is used, the
checkCurrentSerialInTransaction method on the storage is called in
2-phase commit.
...
...
@@ -726,7 +726,7 @@ def doctest_readCurrent():
>>> conn.root.b.x += 1
>>> transaction.commit()
If the storage raises a conflict error, it'll be prop
i
gated:
If the storage raises a conflict error, it'll be prop
a
gated:
>>> _ = str(conn.root.a) # do read
>>> bad.add(conn.root.a._p_oid)
...
...
@@ -760,7 +760,7 @@ def doctest_readCurrent():
>>> store.badness = None
>>> store.tpc_vote = tpc_vote
It will still be prop
i
gated:
It will still be prop
a
gated:
>>> _ = str(conn.root.a) # do read
>>> conn.readCurrent(conn.root.a)
...
...
@@ -776,14 +776,14 @@ def doctest_readCurrent():
>>> conn.root.a._p_changed
Read checks don't leak ac
c
ross transactions:
Read checks don't leak across transactions:
>>> conn.readCurrent(conn.root.a)
>>> transaction.commit()
>>> conn.root.b.x = +1
>>> transaction.commit()
Read checks to work ac
c
ross savepoints.
Read checks to work across savepoints.
>>> conn.readCurrent(conn.root.a)
>>> conn.root.b.x = +1
...
...
@@ -812,7 +812,7 @@ def doctest_cache_management_of_subconnections():
When we use multi-databases, we open a connection in one database and
access connections to other databases through it. This test verifies
thatcache management is applied to all of the connections.
that
cache management is applied to all of the connections.
Set up a multi-database:
...
...
@@ -885,10 +885,10 @@ class C_invalidations_of_new_objects_work_after_savepoint(Persistent):
def
doctest_abort_of_savepoint_creating_new_objects_w_exotic_invalidate_doesnt_break
():
r"""
Before, the following would fail with a POSKeyError, which was
somewhat surpri
z
ing, in a very edgy sort of way. :)
somewhat surpri
s
ing, in a very edgy sort of way. :)
Really, when an object add is aborted, the object should be "removed" from
the db and its invalidat
uon method shouldm
't even be called:
the db and its invalidat
ion method shouldn
't even be called:
>>> conn = ZODB.connection(None)
>>> conn.root.x = x = C_invalidations_of_new_objects_work_after_savepoint()
...
...
@@ -943,7 +943,7 @@ def doctest_lp9460655():
def
doctest_lp615758_transaction_abort_Incomplete_cleanup_for_new_objects
():
r"""
As the following
"DocTest"
demonstrates, "abort" forgets to
As the following
doctest
demonstrates, "abort" forgets to
reset "_p_changed" for new (i.e. "added") objects.
>>> class P(Persistent): pass
...
...
@@ -1124,7 +1124,7 @@ class EstimatedSizeTests(ZODB.tests.util.TestCase):
cache
=
conn
.
_cache
# verify the change worked as expected
self
.
assertEqual
(
cache
.
cache_size_bytes
,
1
)
# verify our entrance assumption is ful
l
filled
# verify our entrance assumption is fulfilled
self
.
assertTrue
(
cache
.
total_estimated_size
>
1
)
conn
.
cacheGC
()
self
.
assertTrue
(
cache
.
total_estimated_size
<=
1
)
...
...
@@ -1138,7 +1138,7 @@ class EstimatedSizeTests(ZODB.tests.util.TestCase):
obj
,
conn
,
cache
=
self
.
obj
,
self
.
conn
,
self
.
conn
.
_cache
# verify the change worked as expected
self
.
assertEqual
(
cache
.
cache_size_bytes
,
1000
)
# verify our entrance assumption is ful
l
filled
# verify our entrance assumption is fulfilled
self
.
assertTrue
(
cache
.
total_estimated_size
>
1
)
# give the objects some size
obj
.
setValueWithSize
(
500
)
...
...
@@ -1259,7 +1259,7 @@ class StubStorage:
self
.
_stored
.
append
(
oid
)
self
.
_transstored
.
append
(
oid
)
self
.
_transdata
[
oid
]
=
(
p
,
serial
)
# Explicitly returing None, as we're not pretending to be a ZEO
# Explicitly retur
n
ing None, as we're not pretending to be a ZEO
# storage
return
None
...
...
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