{"action":"opened","issue":{"url":"https://api.github.com/repos/vitalk/pytest-flask/issues/27","labels_url":"https://api.github.com/repos/vitalk/pytest-flask/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/vitalk/pytest-flask/issues/27/comments","events_url":"https://api.github.com/repos/vitalk/pytest-flask/issues/27/events","html_url":"https://github.com/vitalk/pytest-flask/issues/27","id":60123251,"number":27,"title":"Applicaiton config doesn't teardown when `pytest.mark.app` applied","user":{"login":"vitalk","id":1663958,"avatar_url":"https://avatars.githubusercontent.com/u/1663958?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalk","html_url":"https://github.com/vitalk","followers_url":"https://api.github.com/users/vitalk/followers","following_url":"https://api.github.com/users/vitalk/following{/other_user}","gists_url":"https://api.github.com/users/vitalk/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalk/subscriptions","organizations_url":"https://api.github.com/users/vitalk/orgs","repos_url":"https://api.github.com/users/vitalk/repos","events_url":"https://api.github.com/users/vitalk/events{/privacy}","received_events_url":"https://api.github.com/users/vitalk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-06T16:21:29Z","updated_at":"2015-03-06T16:21:29Z","closed_at":null,"body":"When application fixture has session/class scope, e.g.\r\n\r\n```python\r\n@pytest.fixture(scope='session')\r\ndef app():\r\n    app = Flask(__name__)\r\n    return app\r\n```\r\n\r\nThe `pytest.mark.app` decorator doesn't properly teardown\r\n\r\n```python\r\n@pytest.mark.app(my_key=42)\r\ndef test_foo(app):\r\n    assert 'MY_KEY' in app.config\r\n\r\ndef test_bar(app):\r\n    assert 'MY_KEY' not in app.config, 'WTF?'\r\n```\r\n"}}