Skip to content

Commit cc6c618

Browse files
authored
Merge pull request pallets#2646 from pallets/test-app-name
don't use Flask(__name__) in conftest
2 parents 6248956 + 5f42989 commit cc6c618

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Flask(_Flask):
6060

6161
@pytest.fixture
6262
def app():
63-
app = Flask(__name__)
63+
app = Flask('flask_test', root_path=os.path.dirname(__file__))
6464
return app
6565

6666

tests/test_appctx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,5 @@ def teardown_app(error=None):
215215
except ZeroDivisionError:
216216
pass
217217

218-
assert called == ['conftest', 'TEARDOWN']
218+
assert called == ['flask_test', 'TEARDOWN']
219219
assert not flask.current_app

0 commit comments

Comments
 (0)