File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ def set_warnings() -> None:
60
60
61
61
warnings .filterwarnings ("ignore" , r".*no-sysmon" )
62
62
63
+ # We have a test that has a return in a finally: test_bug_1891.
64
+ warnings .filterwarnings ("ignore" , "'return' in a 'finally' block" , category = SyntaxWarning )
65
+
63
66
64
67
@pytest .fixture (autouse = True )
65
68
def reset_sys_path () -> Iterator [None ]:
Original file line number Diff line number Diff line change @@ -207,6 +207,8 @@ def test_bug_1891(self) -> None:
207
207
)
208
208
""" )
209
209
assert parser .exit_counts () == {1 : 1 }
210
+ # In conftest.py, we silence the SyntaxWarning this code causes. If
211
+ # we remove this code, we can probably remove that warning.
210
212
parser = self .parse_text ("""\
211
213
def g2():
212
214
try:
You can’t perform that action at this time.
0 commit comments