From: Serhiy Storchaka Date: Sat, 31 Jan 2015 00:12:17 +0000 (+0200) Subject: Use float division to avoid deprecation warning in test_timeit (issue #11578). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b84e5daf915296984d46f8fe44547e7bc2924700;p=python Use float division to avoid deprecation warning in test_timeit (issue #11578). --- diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py index 1e09ab1cd2..7154217b1b 100644 --- a/Lib/test/test_timeit.py +++ b/Lib/test/test_timeit.py @@ -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')