use ruff linter and formatter

This commit is contained in:
David Lord 2023-11-09 09:20:27 -08:00
parent 6edfd78c9f
commit 54ff9b2972
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
26 changed files with 99 additions and 128 deletions

View file

@ -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