Skip to content

Cannot run with -p no:tmpdir option #22

Closed
@yoloseem

Description

@yoloseem

When I use xdist option with -p no:tmpdir also set, it causes AttributeError: 'Config' object has no attribute '_tmpdirhandler':

$ py.test -n auto -p no:tmpdir test.py
================================================= test session starts ==================================================
platform darwin -- Python 2.7.9, pytest-2.8.3, py-1.4.31, pluggy-0.3.1
django settings: proj.settings.local (from environment variable)
rootdir: /Users/khj/works/projrepo/proj, inifile: pytest.ini
plugins: cov-2.1.0, django-2.9.1, xdist-1.13.1
gw0 C / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 IINTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/_pytest/main.py", line 88, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 724, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 596, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/xdist/dsession.py", line 494, in pytest_sessionstart
INTERNALERROR>     nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/xdist/slavemanage.py", line 45, in setup_nodes
INTERNALERROR>     nodes.append(self.setup_node(spec, putevent))
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/xdist/slavemanage.py", line 54, in setup_node
INTERNALERROR>     node.setup()
INTERNALERROR>   File "/Users/khj/.pyenv/versions/proj/lib/python2.7/site-packages/xdist/slavemanage.py", line 216, in setup
INTERNALERROR>     basetemp = self.config._tmpdirhandler.getbasetemp()
INTERNALERROR> AttributeError: 'Config' object has no attribute '_tmpdirhandler'

System info:

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11
BuildVersion:   15A284
$ pip freeze | grep -i pytest
pytest==2.8.3
pytest-cov==2.1.0
pytest-django==2.9.1
pytest-xdist==1.13.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions