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
Kirill Smelkov
ZODB
Commits
6cd069dc
Commit
6cd069dc
authored
Feb 20, 2013
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the testXXX convention for test names
parent
338536e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/ZODB/tests/testConnection.py
src/ZODB/tests/testConnection.py
+9
-9
No files found.
src/ZODB/tests/testConnection.py
View file @
6cd069dc
...
...
@@ -51,7 +51,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
self
.
datamgr
.
open
()
self
.
transaction
=
StubTransaction
()
def
check
_add
(
self
):
def
test
_add
(
self
):
from
ZODB.POSException
import
InvalidObjectReference
obj
=
StubObject
()
self
.
assertTrue
(
obj
.
_p_oid
is
None
)
...
...
@@ -75,7 +75,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
obj2
.
_p_jar
=
object
()
self
.
assertRaises
(
InvalidObjectReference
,
self
.
datamgr
.
add
,
obj2
)
def
check
ResetOnAbort
(
self
):
def
test
ResetOnAbort
(
self
):
# Check that _p_oid and _p_jar are reset when a transaction is
# aborted.
obj
=
StubObject
()
...
...
@@ -86,7 +86,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
self
.
assertTrue
(
obj
.
_p_jar
is
None
)
self
.
assertRaises
(
KeyError
,
self
.
datamgr
.
get
,
oid
)
def
check
ResetOnTpcAbort
(
self
):
def
test
ResetOnTpcAbort
(
self
):
obj
=
StubObject
()
self
.
datamgr
.
add
(
obj
)
oid
=
obj
.
_p_oid
...
...
@@ -101,7 +101,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
self
.
assertTrue
(
obj
.
_p_jar
is
None
)
self
.
assertRaises
(
KeyError
,
self
.
datamgr
.
get
,
oid
)
def
check
TpcAbortAfterCommit
(
self
):
def
test
TpcAbortAfterCommit
(
self
):
obj
=
StubObject
()
self
.
datamgr
.
add
(
obj
)
oid
=
obj
.
_p_oid
...
...
@@ -114,7 +114,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
self
.
assertRaises
(
KeyError
,
self
.
datamgr
.
get
,
oid
)
self
.
assertEqual
(
self
.
db
.
storage
.
_stored
,
[
oid
])
def
check
Commit
(
self
):
def
test
Commit
(
self
):
obj
=
StubObject
()
self
.
datamgr
.
add
(
obj
)
oid
=
obj
.
_p_oid
...
...
@@ -130,7 +130,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
self
.
assertEqual
(
self
.
db
.
storage
.
_stored
,
[
oid
])
self
.
assertEqual
(
self
.
db
.
storage
.
_finished
,
[
oid
])
def
check
ModifyOnGetstate
(
self
):
def
test
ModifyOnGetstate
(
self
):
member
=
StubObject
()
subobj
=
StubObject
()
subobj
.
member
=
member
...
...
@@ -147,7 +147,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
"member was not stored"
)
self
.
assertTrue
(
self
.
datamgr
.
_added_during_commit
is
None
)
def
check
UnusedAddWorks
(
self
):
def
test
UnusedAddWorks
(
self
):
# When an object is added, but not committed, it shouldn't be stored,
# but also it should be an error.
obj
=
StubObject
()
...
...
@@ -156,7 +156,7 @@ class ConnectionDotAdd(ZODB.tests.util.TestCase):
self
.
datamgr
.
tpc_finish
(
self
.
transaction
)
self
.
assertTrue
(
obj
.
_p_oid
not
in
self
.
datamgr
.
_storage
.
_stored
)
def
check
__resetCacheResetsReader
(
self
):
def
test
__resetCacheResetsReader
(
self
):
# https://bugs.launchpad.net/zodb/+bug/142667
old_cache
=
self
.
datamgr
.
_cache
self
.
datamgr
.
_resetCache
()
...
...
@@ -1289,7 +1289,7 @@ class StubDatabase:
large_record_size
=
1
<<
30
def
test_suite
():
s
=
unittest
.
makeSuite
(
ConnectionDotAdd
,
'check'
)
s
=
unittest
.
makeSuite
(
ConnectionDotAdd
)
s
.
addTest
(
doctest
.
DocTestSuite
(
checker
=
checker
))
s
.
addTest
(
unittest
.
makeSuite
(
TestConnectionInterface
))
s
.
addTest
(
unittest
.
makeSuite
(
EstimatedSizeTests
))
...
...
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