--- you can reply above this line --- New issue 232: pytest 2.3.4 throws InternalError when not using new keyword syntax https://bitbucket.org/hpk42/pytest/issue/232/pytest-234-throws-internalerror-when-not
Brian O'Neill: Before version 2.3.4 I would run tests like this: py.test -k "smoke -unstable" It would look for the tests marked as smoke and ones aren't marked as unstable. It assumed the "and" between them I saw that the update to 2.3.4 added new keyword syntax so we should be running tests like this: py.test -k "smoke and -unstable" When running the old way it shows a really nasty error: ``` #!python INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/main.py", line 81, in wrap_session INTERNALERROR> doit(config, session) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/main.py", line 112, in _main INTERNALERROR> config.hook.pytest_collection(session=session) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/core.py", line 422, in __call__ INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/core.py", line 433, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/core.py", line 351, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/main.py", line 116, in pytest_collection INTERNALERROR> return session.perform_collect() INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/main.py", line 467, in perform_collect INTERNALERROR> config=self.config, items=items) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/core.py", line 422, in __call__ INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/core.py", line 433, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/core.py", line 351, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/mark.py", line 54, in pytest_collection_modifyitems INTERNALERROR> if keywordexpr and not matchkeyword(colitem, keywordexpr): INTERNALERROR> File "/home/vagrant/python_venv/eb/lib/python2.6/site-packages/_pytest/mark.py", line 89, in matchkeyword INTERNALERROR> return eval(keywordexpr, {}, SubstringDict(colitem.keywords)) INTERNALERROR> File "<string>", line 1 INTERNALERROR> smoke not unstable INTERNALERROR> ^ INTERNALERROR> SyntaxError: unexpected EOF while parsing ``` I think the old way of marking tests should still be supported with the new pytest versions and just automatically assume "and" between the keywords. If this isn't possible it would be useful to get a better error message as it was very confusing trying to figure out what was wrong. Responsible: hpk42 -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn