ImportError: cannot import name Action

Issue #47 on hold
Dirkjan Ochtman created an issue

I have no clue how this could happen:

{{{ #!python

Traceback (most recent call last): File "/usr/bin/py.test-2.7", line 9, in <module> load_entry_point('pytest==2.2.3', 'console_scripts', 'py.test')() File "/usr/lib64/python2.7/site-packages/_pytest/", line 467, in main config = _prepareconfig(args, plugins) File "/usr/lib64/python2.7/site-packages/_pytest/", line 460, in _prepareconfig pluginmanager=_pluginmanager, args=args) File "/usr/lib64/python2.7/site-packages/_pytest/", line 419, in call return self._docall(methods, kwargs) File "/usr/lib64/python2.7/site-packages/_pytest/", line 430, in _docall res = mc.execute() File "/usr/lib64/python2.7/site-packages/_pytest/", line 348, in execute res = method(kwargs) File "/usr/lib64/python2.7/site-packages/_pytest/", line 25, in pytest_cmdline_parse config = __multicall__.execute() File "/usr/lib64/python2.7/site-packages/_pytest/", line 348, in execute res = method(kwargs) File "/usr/lib64/python2.7/site-packages/_pytest/", line 10, in pytest_cmdline_parse config.parse(args) File "/usr/lib64/python2.7/site-packages/_pytest/", line 343, in parse self._preparse(args) File "/usr/lib64/python2.7/site-packages/_pytest/", line 321, in _preparse self._setinitialconftest(args) File "/usr/lib64/python2.7/site-packages/_pytest/", line 300, in _setinitialconftest self._conftest.setinitial(args) File "/usr/lib64/python2.7/site-packages/_pytest/", line 167, in setinitial self.getconftestmodules(x) File "/usr/lib64/python2.7/site-packages/_pytest/", line 188, in getconftestmodules clist.append(self.importconftest(conftestpath)) File "/usr/lib64/python2.7/site-packages/_pytest/", line 217, in importconftest self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport() File "/usr/lib64/python2.7/site-packages/py/_path/", line 532, in pyimport import(modname) File "/var/tmp/portage/dev-python/tox-1.4.1/work/tox-1.4.1/tests/", line 10, in <module> from tox._cmdline import Action ImportError: cannot import name Action }}}

Comments (5)

  1. Ronny Pfannschmidt

    you need to add the root dir to the pythonpath if you test tox outside of a env where it is installed

    this is meant to decouple the testsuite from installation location

  2. Log in to comment