Commit 0bcba372 authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub

bpo-32482: Improve syntax and grammar tests. (#5085)

parent eb08a929
This diff is collapsed.
This diff is collapsed.
...@@ -619,7 +619,7 @@ class JumpTestCase(unittest.TestCase): ...@@ -619,7 +619,7 @@ class JumpTestCase(unittest.TestCase):
def test_jump_in_nested_finally_2(output): def test_jump_in_nested_finally_2(output):
try: try:
output.append(2) output.append(2)
1/0 1.0/0.0
return return
finally: finally:
output.append(6) output.append(6)
...@@ -630,7 +630,7 @@ class JumpTestCase(unittest.TestCase): ...@@ -630,7 +630,7 @@ class JumpTestCase(unittest.TestCase):
def test_jump_in_nested_finally_3(output): def test_jump_in_nested_finally_3(output):
try: try:
output.append(2) output.append(2)
1/0 1.0/0.0
return return
finally: finally:
output.append(6) output.append(6)
...@@ -697,7 +697,7 @@ class JumpTestCase(unittest.TestCase): ...@@ -697,7 +697,7 @@ class JumpTestCase(unittest.TestCase):
@jump_test(5, 7, [4, 7, 8]) @jump_test(5, 7, [4, 7, 8])
def test_jump_between_except_blocks(output): def test_jump_between_except_blocks(output):
try: try:
1/0 1.0/0.0
except ZeroDivisionError: except ZeroDivisionError:
output.append(4) output.append(4)
output.append(5) output.append(5)
...@@ -708,7 +708,7 @@ class JumpTestCase(unittest.TestCase): ...@@ -708,7 +708,7 @@ class JumpTestCase(unittest.TestCase):
@jump_test(5, 6, [4, 6, 7]) @jump_test(5, 6, [4, 6, 7])
def test_jump_within_except_block(output): def test_jump_within_except_block(output):
try: try:
1/0 1.0/0.0
except: except:
output.append(4) output.append(4)
output.append(5) output.append(5)
......
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