diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-31 02:12:17 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-31 02:12:17 +0200 |
commit | b84e5daf915296984d46f8fe44547e7bc2924700 (patch) | |
tree | ac19946ab3736701dc761741965eb329e2113da7 | |
parent | 227526dc5c47151d3829823f39ba122e7a348ed1 (diff) | |
download | cpython-git-b84e5daf915296984d46f8fe44547e7bc2924700.tar.gz |
Use float division to avoid deprecation warning in test_timeit (issue #11578).
-rw-r--r-- | 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 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') |