Commit 50073e22 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Use float division to avoid deprecation warning in test_timeit (issue #11578).

parent 0d250d11
......@@ -296,12 +296,12 @@ class TestTimeit(unittest.TestCase):
def test_main_exception(self):
with captured_stderr() as error_stringio:
s = self.run_main(switches=['1/0'])
s = self.run_main(switches=['1.0/0.0'])
self.assert_exc_string(error_stringio.getvalue(), 'ZeroDivisionError')
def test_main_exception_fixed_reps(self):
with captured_stderr() as error_stringio:
s = self.run_main(switches=['-n1', '1/0'])
s = self.run_main(switches=['-n1', '1.0/0.0'])
self.assert_exc_string(error_stringio.getvalue(), 'ZeroDivisionError')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment