Browse Source

Make test more idiomatic

pull/2247/head
Diggory Blake 8 years ago committed by Markus Unterwaditzer
parent
commit
6f7847e3c4
  1. 5
      tests/test_basic.py

5
tests/test_basic.py

@ -800,11 +800,8 @@ def test_baseexception_error_handling():
raise KeyboardInterrupt()
with app.test_client() as c:
try:
with pytest.raises(KeyboardInterrupt):
c.get('/')
raise AssertionError("KeyboardInterrupt should have been raised")
except KeyboardInterrupt:
pass
ctx = flask._request_ctx_stack.top
assert ctx.preserved

Loading…
Cancel
Save