{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/1331","repository_url":"https://api.github.com/repos/pytest-dev/pytest","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1331/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1331/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1331/events","html_url":"https://github.com/pytest-dev/pytest/issues/1331","id":126838198,"number":1331,"title":"UnicodeDecodeError in invalid assert statement","user":{"login":"pelme","id":20529,"avatar_url":"https://avatars.githubusercontent.com/u/20529?v=3","gravatar_id":"","url":"https://api.github.com/users/pelme","html_url":"https://github.com/pelme","followers_url":"https://api.github.com/users/pelme/followers","following_url":"https://api.github.com/users/pelme/following{/other_user}","gists_url":"https://api.github.com/users/pelme/gists{/gist_id}","starred_url":"https://api.github.com/users/pelme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelme/subscriptions","organizations_url":"https://api.github.com/users/pelme/orgs","repos_url":"https://api.github.com/users/pelme/repos","events_url":"https://api.github.com/users/pelme/events{/privacy}","received_events_url":"https://api.github.com/users/pelme/received_events","type":"User","site_admin":false},"labels":[{"id":224849193,"url":"https://api.github.com/repos/pytest-dev/pytest/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-01-15T09:41:25Z","updated_at":"2016-11-26T15:03:34Z","closed_at":null,"body":"```\n‹tempenv-55e831397233f› ~ → cat test_foo.py\n# -*- coding: utf-8 -*-\nassert 'ål', in 'a'\n‹tempenv-55e831397233f› ~ → py.test --version\nThis is pytest version 2.8.5, imported from /Users/andreas/.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/pytest.pyc\n‹tempenv-55e831397233f› ~ → py.test test_foo.py\n================================================= test session starts ==================================================\nplatform darwin -- Python 2.7.10, pytest-2.8.5, py-1.4.31, pluggy-0.3.1\nrootdir: /Users/andreas, inifile:\ncollected 0 items / 1 errors\n\n======================================================== ERRORS ========================================================\n_____________________________________________ ERROR collecting test_foo.py _____________________________________________\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:412: in getrepr\n    return fmt.repr_excinfo(self)\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:590: in repr_excinfo\n    reprtraceback = self.repr_traceback(excinfo)\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:582: in repr_traceback\n    reprentry = self.repr_traceback_entry(entry, einfo)\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:543: in repr_traceback_entry\n    s = self.get_source(source, line_index, excinfo, short=short)\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:489: in get_source\n    lines.extend(self.get_exconly(excinfo, indent=indent, markall=True))\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:496: in get_exconly\n    exlines = excinfo.exconly(tryshort=True).split('\\n')\n.virtualenvs/tempenv-55e831397233f/lib/python2.7/site-packages/py/_code/code.py:376: in exconly\n    text = ''.join(lines)\nE   UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)\n=============================================== 1 error in 0.16 seconds ================================================\n‹tempenv-55e831397233f› ~ → python test_foo.py\n  File \"test_foo.py\", line 2\n    assert 'ål', in 'a'\n                   ^\nSyntaxError: invalid syntax\n```\n\nThe example is obviously not valid Python syntax and broken, but pytest should raise a SyntaxError.\n"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/263067950","html_url":"https://github.com/pytest-dev/pytest/issues/1331#issuecomment-263067950","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1331","id":263067950,"user":{"login":"lwm","id":1991377,"avatar_url":"https://avatars.githubusercontent.com/u/1991377?v=3","gravatar_id":"","url":"https://api.github.com/users/lwm","html_url":"https://github.com/lwm","followers_url":"https://api.github.com/users/lwm/followers","following_url":"https://api.github.com/users/lwm/following{/other_user}","gists_url":"https://api.github.com/users/lwm/gists{/gist_id}","starred_url":"https://api.github.com/users/lwm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwm/subscriptions","organizations_url":"https://api.github.com/users/lwm/orgs","repos_url":"https://api.github.com/users/lwm/repos","events_url":"https://api.github.com/users/lwm/events{/privacy}","received_events_url":"https://api.github.com/users/lwm/received_events","type":"User","site_admin":false},"created_at":"2016-11-26T15:03:34Z","updated_at":"2016-11-26T15:03:34Z","body":"Well, #103 is closed off and the following happens:\r\n\r\n``` bash\r\n$ pytest --version\r\nThis is pytest version 3.0.4 ...\r\n$ echo \"# -*- coding: utf-8 -*-\\nassert 'ål', in 'a'\" > test_foo.py | pytest\r\n=================================================================================================================== ERRORS ====================================================================================================================\r\n________________________________________________________________________________________________________ ERROR collecting test_foo.py _________________________________________________________________________________________________________\r\n.venv/lib/python3.5/site-packages/_pytest/python.py:415: in _importtestmodule\r\n    mod = self.fspath.pyimport(ensuresyspath=importmode)\r\n.venv/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport\r\n    __import__(modname)\r\nE     File \"/home/lwm/hobby/pytest/test_foo.py\", line 2\r\nE       assert 'ål', in 'a'\r\nE                     ^\r\nE   SyntaxError: invalid syntax\r\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n=========================================================================================================== 1 error in 1.63 seconds ===========================================================================================================\r\n```\r\n\r\nLooks like this one can be closed off!"}}
{"actor":{"display_login":"lwm"}}