{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/840","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/840/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/840/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/840/events","html_url":"https://github.com/pytest-dev/pytest/issues/840","id":94930816,"number":840,"title":"Inconsistent behaviour of recwarn","user":{"login":"Themanwithoutaplan","id":1080058,"avatar_url":"https://avatars.githubusercontent.com/u/1080058?v=3","gravatar_id":"","url":"https://api.github.com/users/Themanwithoutaplan","html_url":"https://github.com/Themanwithoutaplan","followers_url":"https://api.github.com/users/Themanwithoutaplan/followers","following_url":"https://api.github.com/users/Themanwithoutaplan/following{/other_user}","gists_url":"https://api.github.com/users/Themanwithoutaplan/gists{/gist_id}","starred_url":"https://api.github.com/users/Themanwithoutaplan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Themanwithoutaplan/subscriptions","organizations_url":"https://api.github.com/users/Themanwithoutaplan/orgs","repos_url":"https://api.github.com/users/Themanwithoutaplan/repos","events_url":"https://api.github.com/users/Themanwithoutaplan/events{/privacy}","received_events_url":"https://api.github.com/users/Themanwithoutaplan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-14T12:05:38Z","updated_at":"2015-07-14T13:24:29Z","closed_at":null,"body":"I'm have a test that checks that a warning is issued. This runs perfectly with pytest but can fail when using tox. I suspect that it has something to do with the warningsregistry but I can't see offhand.\r\n\r\nA traceback can be seen at: https://build.adimian.com/job/openpyxl-2.3/70/consoleFull\r\n\r\nThe failure happens when testing is not restricted to the relevant module.\r\n\r\nie. `tox -e py27 openpyxl/reader` does not fail but `tox -e py27 openpyxl` does. The failures are consistent across Python versions.\r\n\r\nI suspect that this is related to #228 and will try to create a workaround."},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/121236721","html_url":"https://github.com/pytest-dev/pytest/issues/840#issuecomment-121236721","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/840","id":121236721,"user":{"login":"Themanwithoutaplan","id":1080058,"avatar_url":"https://avatars.githubusercontent.com/u/1080058?v=3","gravatar_id":"","url":"https://api.github.com/users/Themanwithoutaplan","html_url":"https://github.com/Themanwithoutaplan","followers_url":"https://api.github.com/users/Themanwithoutaplan/followers","following_url":"https://api.github.com/users/Themanwithoutaplan/following{/other_user}","gists_url":"https://api.github.com/users/Themanwithoutaplan/gists{/gist_id}","starred_url":"https://api.github.com/users/Themanwithoutaplan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Themanwithoutaplan/subscriptions","organizations_url":"https://api.github.com/users/Themanwithoutaplan/orgs","repos_url":"https://api.github.com/users/Themanwithoutaplan/repos","events_url":"https://api.github.com/users/Themanwithoutaplan/events{/privacy}","received_events_url":"https://api.github.com/users/Themanwithoutaplan/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T13:24:29Z","updated_at":"2015-07-14T13:24:29Z","body":"A workaround is to set `warnings.filter('always')` somewhere in a test module so that it is executed at runtime. It doesn't work for me if I do it within a test. Does this mean that tox is setting warnings.filters itself?"}}