Skip to content

Commit 6f7847e

Browse files
Diggseyuntitaker
authored andcommitted
Make test more idiomatic
1 parent d0e2e7b commit 6f7847e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/test_basic.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,8 @@ def broken_func():
800800
raise KeyboardInterrupt()
801801

802802
with app.test_client() as c:
803-
try:
803+
with pytest.raises(KeyboardInterrupt):
804804
c.get('/')
805-
raise AssertionError("KeyboardInterrupt should have been raised")
806-
except KeyboardInterrupt:
807-
pass
808805

809806
ctx = flask._request_ctx_stack.top
810807
assert ctx.preserved

0 commit comments

Comments
 (0)