]> granicus.if.org Git - python/commitdiff
Use float division to avoid deprecation warning in test_timeit (issue #11578).
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 31 Jan 2015 00:12:17 +0000 (02:12 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 31 Jan 2015 00:12:17 +0000 (02:12 +0200)
Lib/test/test_timeit.py

index 1e09ab1cd29ab57b652321cad42bb55b7148be22..7154217b1bb3c8916a91a9338f761306c30b3af9 100644 (file)
@@ -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')