Skip to content

Commit b83c52e

Browse files
fixup! Restore compatibility with Python 3.9's legacy LL(1) parser in the tests
1 parent 9bb9a4f commit b83c52e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

hypothesis-python/tests/cover/test_observability.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ def test_fails(should_fail, should_fail_assume):
334334
# NOTE: For compatibility with Python 3.9's LL(1)
335335
# parser, this is written as a nested with-statement,
336336
# instead of a compound one.
337-
with pytest.raises(AssertionError) if expected_status == "failed" else nullcontext():
337+
with (
338+
pytest.raises(AssertionError)
339+
if expected_status == "failed"
340+
else nullcontext()
341+
):
338342
test_fails.hypothesis.fuzz_one_input(buffer)
339343
assert len(ls) == 1
340344
assert ls[0].status == expected_status

hypothesis-python/tests/cover/test_seed_printing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ def test(i):
7575

7676
for _ in range(2):
7777
with capture_out() as o:
78-
# NOTE: For compatibility with Python 3.9's LL(1)
79-
# parser, this is written as a nested with-statement,
80-
# instead of a compound one.
78+
# NOTE: For compatibility with Python 3.9's LL(1)
79+
# parser, this is written as a nested with-statement,
80+
# instead of a compound one.
8181
with pytest.raises(ValueError):
8282
test()
8383
output.append(o.getvalue())

0 commit comments

Comments
 (0)