pytest results in "Unable to attach test reporter" error in PyCharm EAP 3.0

I've got a web2py project that I've created unit tests for. I keep the unit tests in a directory called tests, whereas the code I'm testing is under the standard modules directory:
/tagpoc (project root)
            /tagpoc (web2py app. root)
I've configured pytest in Preferences->Python Integrated Tools. In the Edit Configuration dialog, I've tried specifying the /tagpoc directory in the working directory option (I can run pytest from the cmdline successfully from this directory, albeit only after I set PYTHONPATH=$PYTHONPATH:`pwd`).

When I run the test, I receive an Unable to attach test reporter to test framework or test framework quit unexpectedly in the left side of the tool window and the following trace in the right:

/Users/chb/.virtualenvs/tagPoc/bin/python "/Applications/PyCharm 3.0" -p pytest_teamcity /Users/chb/code/tagpoc/web2py/applications/tagpoc/tests/
Testing started at 6:31 PM ...
Traceback (most recent call last):
  File "/Applications/PyCharm 3.0", line 51, in <module>
  File "/Applications/PyCharm 3.0", line 24, in main
    pluginmanager=_pluginmanager, args=args)
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 441, in __call__
    return self._docall(methods, kwargs)
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 452, in _docall
    res = mc.execute()
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 370, in execute
    res = method(**kwargs)
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 25, in pytest_cmdline_parse
    config = __multicall__.execute()
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 370, in execute
    res = method(**kwargs)
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 10, in pytest_cmdline_parse
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 373, in parse
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 348, in _preparse
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 183, in consider_preparse
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 193, in consider_pluginarg
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 213, in import_plugin
    mod = importplugin(modname)
  File "/Users/chb/.virtualenvs/tagPoc/lib/python2.7/site-packages/_pytest/", line 349, in importplugin
  File "/Applications/PyCharm 3.0", line 3, in <module>
    helpers_dir = os.getenv("PYCHARM_HELPERS_DIR", sys.path[0])
NameError: name 'sys' is not defined

Process finished with exit code 1

What am I doing wrong?

PyCharm 3.0 EAP (130.1058)
Python 2.7.5
pytest 2.3.5
1 comment
That's a bug in PyCharm; we'll fix it in the next update build. Thanks for the information!

Please sign in to leave a comment.