forked from orbit-oss/flask
use ruff linter and formatter
This commit is contained in:
parent
6edfd78c9f
commit
54ff9b2972
26 changed files with 99 additions and 128 deletions
|
|
@ -196,17 +196,14 @@ def test_clean_pop(app):
|
|||
|
||||
@app.teardown_request
|
||||
def teardown_req(error=None):
|
||||
1 / 0
|
||||
raise ZeroDivisionError
|
||||
|
||||
@app.teardown_appcontext
|
||||
def teardown_app(error=None):
|
||||
called.append("TEARDOWN")
|
||||
|
||||
try:
|
||||
with app.test_request_context():
|
||||
called.append(flask.current_app.name)
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
with app.app_context():
|
||||
called.append(flask.current_app.name)
|
||||
|
||||
assert called == ["flask_test", "TEARDOWN"]
|
||||
assert not flask.current_app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue