Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
transaction
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
transaction
Commits
8cc2c8fc
Commit
8cc2c8fc
authored
Dec 17, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coverage for TransactionManager.{isDoomed,doom}.
parent
5b4e7a2d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
transaction/tests/test__manager.py
transaction/tests/test__manager.py
+25
-0
No files found.
transaction/tests/test__manager.py
View file @
8cc2c8fc
...
...
@@ -112,6 +112,31 @@ class TransactionManagerTests(unittest.TestCase):
self
.
assertFalse
(
synch1
in
tm
.
_synchs
)
self
.
assertTrue
(
synch2
in
tm
.
_synchs
)
def
test_isDoomed_wo_existing_txn
(
self
):
tm
=
self
.
_makeOne
()
self
.
assertFalse
(
tm
.
isDoomed
())
tm
.
_txn
.
doom
()
self
.
assertTrue
(
tm
.
isDoomed
())
def
test_isDoomed_w_existing_txn
(
self
):
class
Existing
(
object
):
_doomed
=
False
def
isDoomed
(
self
):
return
self
.
_doomed
tm
=
self
.
_makeOne
()
tm
.
_txn
=
txn
=
Existing
()
self
.
assertFalse
(
tm
.
isDoomed
())
txn
.
_doomed
=
True
self
.
assertTrue
(
tm
.
isDoomed
())
def
test_doom
(
self
):
tm
=
self
.
_makeOne
()
txn
=
tm
.
get
()
self
.
assertFalse
(
txn
.
isDoomed
())
tm
.
doom
()
self
.
assertTrue
(
txn
.
isDoomed
())
self
.
assertTrue
(
tm
.
isDoomed
())
# basic tests with two sub trans jars
# really we only need one, so tests for
# sub1 should identical to tests for sub2
...
...
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