diff options
author | Alex Kuang <akuang@bizo.com> | 2014-05-05 08:58:26 -0400 |
---|---|---|
committer | Alex Kuang <akuang@bizo.com> | 2014-05-05 08:58:26 -0400 |
commit | ff817d98fc98b722befb3bbb1a6a53cc3f207a5d (patch) | |
tree | cdfd3866cdf52234815076c5300edf79cb852077 /test_retrying.py | |
parent | c86e061eaa65b960ce6c56439a05d9f1c9d55717 (diff) | |
download | retrying-ff817d98fc98b722befb3bbb1a6a53cc3f207a5d.tar.gz |
Fix AttributeError when explicitly specifying wait type, and add appropriate regression tests. (fixes #4)
Diffstat (limited to 'test_retrying.py')
-rw-r--r-- | test_retrying.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test_retrying.py b/test_retrying.py index b5f7ed6..43c9000 100644 --- a/test_retrying.py +++ b/test_retrying.py @@ -37,6 +37,9 @@ class TestStopConditions(unittest.TestCase): self.assertTrue(r.stop(2, 1000)) self.assertTrue(r.stop(2, 1001)) + def test_legacy_explicit_stop_type(self): + r = Retrying(stop="stop_after_attempt") + class TestWaitConditions(unittest.TestCase): def test_no_sleep(self): @@ -108,6 +111,9 @@ class TestWaitConditions(unittest.TestCase): self.assertEqual(r.wait(7, 0), 50000) self.assertEqual(r.wait(50, 0), 50000) + def test_legacy_explicit_wait_type(self): + r = Retrying(wait="exponential_sleep") + class NoneReturnUntilAfterCount: """ This class holds counter state for invoking a method several times in a row. |