Commit 2212ee2b authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

Replace 1/0 with 1//0 in tests to avoid Python 3 warns (GH-10833)

Fix DeprecationWarning when tests are run using python -3.
parent bc9f53f6
...@@ -868,7 +868,7 @@ class BreakpointTestCase(BaseTestCase): ...@@ -868,7 +868,7 @@ class BreakpointTestCase(BaseTestCase):
with create_modules(modules): with create_modules(modules):
self.expect_set = [ self.expect_set = [
('line', 2, 'tfunc_import'), ('line', 2, 'tfunc_import'),
break_in_func('func', TEST_MODULE_FNAME, False, '1 / 0'), break_in_func('func', TEST_MODULE_FNAME, False, '1 // 0'),
('None', 2, 'tfunc_import'), ('continue', ), ('None', 2, 'tfunc_import'), ('continue', ),
('line', 3, 'func', ({1:1}, [])), ('quit', ), ('line', 3, 'func', ({1:1}, [])), ('quit', ),
] ]
......
...@@ -423,7 +423,7 @@ except RuntimeError, e: ...@@ -423,7 +423,7 @@ except RuntimeError, e:
# Test division by zero: # Test division by zero:
gdb_repr, gdb_output = self.get_gdb_repr(''' gdb_repr, gdb_output = self.get_gdb_repr('''
try: try:
a = 1 / 0 a = 1 // 0
except ZeroDivisionError, e: except ZeroDivisionError, e:
print e print e
''') ''')
......
...@@ -1053,7 +1053,7 @@ output.append(4) ...@@ -1053,7 +1053,7 @@ output.append(4)
"can only jump from a 'line' trace event")) "can only jump from a 'line' trace event"))
def test_no_jump_from_exception_event(output): def test_no_jump_from_exception_event(output):
output.append(1) output.append(1)
1 / 0 1 // 0
@jump_test(3, 2, [2], event='return', error=(ValueError, @jump_test(3, 2, [2], event='return', error=(ValueError,
"can't jump from a yield statement")) "can't jump from a yield statement"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment