xdist now works if the internal tmpdir plugin is disabled

Fix #22
This commit is contained in:
Bruno Oliveira
2015-12-05 12:03:30 -02:00
parent afd3f2bb01
commit 5ddef63085
3 changed files with 16 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
-------
- fix readme display on pypi
- fix #22: xdist now works if the internal tmpdir plugin is disabled.
1.13.1

View File

@@ -522,6 +522,18 @@ def test_issue_594_random_parametrize(testdir):
])
def test_tmpdir_disabled(testdir):
"""Test xdist doesn't break if internal tmpdir plugin is disabled (#22).
"""
p1 = testdir.makepyfile("""
def test_ok():
pass
""")
result = testdir.runpytest(p1, "-n1", '-p', 'no:tmpdir')
assert result.ret == 0
result.stdout.fnmatch_lines("*1 passed*")
class TestNodeFailure:
def test_load_single(self, testdir):
f = testdir.makepyfile("""

View File

@@ -228,6 +228,7 @@ class SlaveController(object):
option_dict = vars(self.config.option)
if spec.popen:
name = "popen-%s" % self.gateway.id
if hasattr(self.config, '_tmpdirhandler'):
basetemp = self.config._tmpdirhandler.getbasetemp()
option_dict['basetemp'] = str(basetemp.join(name))
self.config.hook.pytest_configure_node(node=self)