{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/608","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/608/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/608/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/608/events","html_url":"https://github.com/pytest-dev/pytest/issues/608","id":88535853,"number":608,"title":"Failed assertions with any/all and generator expressions raise NameError","user":{"login":"pytestbot","id":12873537,"avatar_url":"https://avatars.githubusercontent.com/u/12873537?v=3","gravatar_id":"","url":"https://api.github.com/users/pytestbot","html_url":"https://github.com/pytestbot","followers_url":"https://api.github.com/users/pytestbot/followers","following_url":"https://api.github.com/users/pytestbot/following{/other_user}","gists_url":"https://api.github.com/users/pytestbot/gists{/gist_id}","starred_url":"https://api.github.com/users/pytestbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytestbot/subscriptions","organizations_url":"https://api.github.com/users/pytestbot/orgs","repos_url":"https://api.github.com/users/pytestbot/repos","events_url":"https://api.github.com/users/pytestbot/events{/privacy}","received_events_url":"https://api.github.com/users/pytestbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pytest-dev/pytest/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-10-06T12:54:10Z","updated_at":"2015-09-09T05:09:32Z","closed_at":null,"body":"Originally reported by: **Bjørnar Snoksrud (BitBucket: [bjornars](http://bitbucket.org/bjornars), GitHub: [bjornars](http://github.com/bjornars))**\n\n----------------------------------------\n\nTested with pytest 2.6.1:\n\nrepro.py:\n\n```\n#!python\n\nfrom repro2 import foo\n                      \n                      \ndef test_case():      \n    foo()   \n```\n          \n\nrepro2.py:\n\n```\n#!python\n\ndef foo():                           \n    obj = {}                         \n    assert all(x in obj for x in '1')\n```\n\nRunning the test.\n```\n#!python\n\n$ py.test repro.py \nplatform linux2 -- Python 2.7.5 -- py-1.4.23 -- pytest-2.5.2\nplugins: xdist\ncollected 1 items \n\nrepro.py F\n\n============================================= FAILURES \n_____________________________________________ test_case \n\n    def test_case():\n>       foo()\n\nrepro.py:5: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\n    def foo():\n        obj = {}\n>       assert all(x in obj for x in '1')\nE       AssertionError: NameError: all(<generator object <genexpr> at 0x2ab35a0>)  << global name 'obj' is not defined\n```\n\nThis looks alot like #339, but the kicker is this: if you move the 'foo()' function to the file  containing the testcase, it works as expected.\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/pytest-dev/pytest/issue/608\n"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/138786262","html_url":"https://github.com/pytest-dev/pytest/issues/608#issuecomment-138786262","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/608","id":138786262,"user":{"login":"RonnyPfannschmidt","id":156838,"avatar_url":"https://avatars.githubusercontent.com/u/156838?v=3","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T05:09:32Z","updated_at":"2015-09-09T05:09:32Z","body":"@hpk42 would it be sensible to just completely remove the non ast reinterpretation?"}}