{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/1606","repository_url":"https://api.github.com/repos/pytest-dev/pytest","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1606/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1606/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1606/events","html_url":"https://github.com/pytest-dev/pytest/pull/1606","id":159799099,"number":1606,"title":"Show fixtures per test","user":{"login":"hackebrot","id":6024445,"avatar_url":"https://avatars.githubusercontent.com/u/6024445?v=3","gravatar_id":"","url":"https://api.github.com/users/hackebrot","html_url":"https://github.com/hackebrot","followers_url":"https://api.github.com/users/hackebrot/followers","following_url":"https://api.github.com/users/hackebrot/following{/other_user}","gists_url":"https://api.github.com/users/hackebrot/gists{/gist_id}","starred_url":"https://api.github.com/users/hackebrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackebrot/subscriptions","organizations_url":"https://api.github.com/users/hackebrot/orgs","repos_url":"https://api.github.com/users/hackebrot/repos","events_url":"https://api.github.com/users/hackebrot/events{/privacy}","received_events_url":"https://api.github.com/users/hackebrot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-06-11T23:41:47Z","updated_at":"2016-06-14T11:38:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pytest-dev/pytest/pulls/1606","html_url":"https://github.com/pytest-dev/pytest/pull/1606","diff_url":"https://github.com/pytest-dev/pytest/pull/1606.diff","patch_url":"https://github.com/pytest-dev/pytest/pull/1606.patch"},"body":"New cli flag ``--fixtures-per-test`` that shows which fixtures are being used for each selected test item. Features doc strings of fixtures by default. Can also show where fixtures are defined if combined with ``-v``.\r\n\r\nThis feature is going to help understand how pytest fixture injection works as to where it gets the fixtures from. Sometimes users get confused if a test suite contains a number of conftest.py files that define fixtures but also test modules which have their own. This gets particularly complex if fixtures share a name.\r\n\r\nExample output for ``--fixtures-per-test -v``:\r\n\r\n```text\r\n-------- fixtures used by test_value_error_if_key_missing_in_context --------\r\n--------------------- from tests/replay/test_dump.py:50 ---------------------\r\nremove_replay_dump -- tests/replay/test_dump.py:29\r\n    Remove the replay file created by tests.\r\nreplay_file -- tests/replay/test_dump.py:22\r\n    Fixture to return a actual file name of the dump.\r\nreplay_test_dir -- tests/replay/conftest.py:18\r\n    no docstring available\r\ntemplate_name -- tests/replay/test_dump.py:16\r\n    Fixture to return a valid template_name.\r\n```\r\n\r\nPlease let me know your thoughts! 🙇 \r\n"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/225855631","html_url":"https://github.com/pytest-dev/pytest/pull/1606#issuecomment-225855631","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1606","id":225855631,"user":{"login":"hackebrot","id":6024445,"avatar_url":"https://avatars.githubusercontent.com/u/6024445?v=3","gravatar_id":"","url":"https://api.github.com/users/hackebrot","html_url":"https://github.com/hackebrot","followers_url":"https://api.github.com/users/hackebrot/followers","following_url":"https://api.github.com/users/hackebrot/following{/other_user}","gists_url":"https://api.github.com/users/hackebrot/gists{/gist_id}","starred_url":"https://api.github.com/users/hackebrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackebrot/subscriptions","organizations_url":"https://api.github.com/users/hackebrot/orgs","repos_url":"https://api.github.com/users/hackebrot/repos","events_url":"https://api.github.com/users/hackebrot/events{/privacy}","received_events_url":"https://api.github.com/users/hackebrot/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T11:38:46Z","updated_at":"2016-06-14T11:38:46Z","body":"Okay, let's have another PR for the ``(autouse)`` indicators. 👍 "}}
{"actor":{"display_login":"hackebrot"}}