Skip to content

Commit

Permalink
transaction._manager: 100% branch coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Dec 16, 2014
1 parent e1d3bcc commit 79ead55
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions transaction/tests/test__manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,19 @@ def should_retry(self, err):
tm.get()._resources.append(_Resource())
self.assertTrue(tm._retryable(Exception, object()))

def test__retryable_w_multiple(self):
class _Resource(object):
_should = True
def should_retry(self, err):
return self._should
tm = self._makeOne()
res1 = _Resource()
res1._should = False
res2 = _Resource()
tm.get()._resources.append(res1)
tm.get()._resources.append(res2)
self.assertTrue(tm._retryable(Exception, object()))

# basic tests with two sub trans jars
# really we only need one, so tests for
# sub1 should identical to tests for sub2
Expand Down

0 comments on commit 79ead55

Please sign in to comment.