From ff817d98fc98b722befb3bbb1a6a53cc3f207a5d Mon Sep 17 00:00:00 2001 From: Alex Kuang Date: Mon, 5 May 2014 08:58:26 -0400 Subject: Fix AttributeError when explicitly specifying wait type, and add appropriate regression tests. (fixes #4) --- test_retrying.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test_retrying.py') 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. -- cgit v1.2.1