diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-30 16:44:55 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-30 16:44:55 (GMT) |
commit | 1b560cbf850fc1c8165b3505c4a137de0abf3668 (patch) | |
tree | 9c046095572c0e9b298cfa0c2902a912d458fbee /Lib/test/test_timeit.py | |
parent | 8c7ed012b87db4de66da61c2f7c0a11a61277384 (diff) | |
parent | f28fa66351fe93b3fcdc98c7f35f05573ea93df2 (diff) | |
download | cpython-1b560cbf850fc1c8165b3505c4a137de0abf3668.zip cpython-1b560cbf850fc1c8165b3505c4a137de0abf3668.tar.gz cpython-1b560cbf850fc1c8165b3505c4a137de0abf3668.tar.bz2 |
Issue #5633: Fixed timeit when the statement is a string and the setup is not.
Refactored timeit.__init__ for unified handling of stmt and setup parameters.
Diffstat (limited to 'Lib/test/test_timeit.py')
-rw-r--r-- | Lib/test/test_timeit.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py index 83c93f7..5e9d49e 100644 --- a/Lib/test/test_timeit.py +++ b/Lib/test/test_timeit.py @@ -124,6 +124,9 @@ class TestTimeit(unittest.TestCase): def test_timeit_callable_stmt(self): self.timeit(self.fake_callable_stmt, self.fake_setup, number=3) + def test_timeit_callable_setup(self): + self.timeit(self.fake_stmt, self.fake_callable_setup, number=3) + def test_timeit_callable_stmt_and_setup(self): self.timeit(self.fake_callable_stmt, self.fake_callable_setup, number=3) @@ -184,6 +187,10 @@ class TestTimeit(unittest.TestCase): self.repeat(self.fake_callable_stmt, self.fake_setup, repeat=3, number=5) + def test_repeat_callable_setup(self): + self.repeat(self.fake_stmt, self.fake_callable_setup, + repeat=3, number=5) + def test_repeat_callable_stmt_and_setup(self): self.repeat(self.fake_callable_stmt, self.fake_callable_setup, repeat=3, number=5) |