forked from orbit-oss/flask
move and update flake8 config
This commit is contained in:
parent
8bfc0581e7
commit
99b34f7148
6 changed files with 33 additions and 35 deletions
|
|
@ -120,14 +120,14 @@ def test_app_tearing_down_with_unhandled_exception(app, client):
|
|||
|
||||
@app.route("/")
|
||||
def index():
|
||||
raise Exception("dummy")
|
||||
raise ValueError("dummy")
|
||||
|
||||
with pytest.raises(Exception, match="dummy"):
|
||||
with pytest.raises(ValueError, match="dummy"):
|
||||
with app.app_context():
|
||||
client.get("/")
|
||||
|
||||
assert len(cleanup_stuff) == 1
|
||||
assert isinstance(cleanup_stuff[0], Exception)
|
||||
assert isinstance(cleanup_stuff[0], ValueError)
|
||||
assert str(cleanup_stuff[0]) == "dummy"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue