cpython (2.7): Use float division to avoid deprecation warning in test_timeit (issue #11578).
https://hg.python.org/cpython/rev/aa6f8e067ec3 changeset: 94402:aa6f8e067ec3 branch: 2.7 parent: 94400:245c9f372a34 user: Serhiy Storchaka <storchaka@gmail.com> date: Sat Jan 31 02:12:17 2015 +0200 summary: Use float division to avoid deprecation warning in test_timeit (issue #11578). files: Lib/test/test_timeit.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py --- a/Lib/test/test_timeit.py +++ b/Lib/test/test_timeit.py @@ -296,12 +296,12 @@ 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') -- Repository URL: https://hg.python.org/cpython
participants (1)
-
serhiy.storchaka