summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-01-31 02:12:17 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-01-31 02:12:17 +0200
commitb84e5daf915296984d46f8fe44547e7bc2924700 (patch)
treeac19946ab3736701dc761741965eb329e2113da7
parent227526dc5c47151d3829823f39ba122e7a348ed1 (diff)
downloadcpython-git-b84e5daf915296984d46f8fe44547e7bc2924700.tar.gz
Use float division to avoid deprecation warning in test_timeit (issue #11578).
-rw-r--r--Lib/test/test_timeit.py4
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')