Skip to content
Myr

Merge pull request #2646 from pallets/test-app-name

Before adoption: this commit came in with the history the project adopted, so no landing records it.

don't use Flask(__name__) in conftest

authored by David Lord · committed by GitHub · parents 6248956, 5f42989 · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • tests:+2 added−2 removed

2 files+2 added−2 removed

modified:tests/conftest.py+1 added-1 removed
58 unmodified lines
596061@pytest.fixture62def app():63 app = Flask(__name__)63 app = Flask('flask_test', root_path=os.path.dirname(__file__))64 return app656667@pytest.fixture
138 unmodified lines
modified:tests/test_appctx.py+1 added-1 removed
213 unmodified lines
214 called.append(flask.current_app.name)215 except ZeroDivisionError:216 pass217218 assert called == ['conftest', 'TEARDOWN']218 assert called == ['flask_test', 'TEARDOWN']219 assert not flask.current_app