Issue #5633: Fixed timeit when the statement is a string and the setup is not.
diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py
index a084b68..3a3359c 100644
--- a/Lib/test/test_timeit.py
+++ b/Lib/test/test_timeit.py
@@ -120,6 +120,9 @@
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)
@@ -169,6 +172,10 @@
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)