Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with pytest master #510

Closed
blueyed opened this issue Feb 22, 2020 · 1 comment · Fixed by pytest-dev/pytest#6992
Closed

Test failure with pytest master #510

blueyed opened this issue Feb 22, 2020 · 1 comment · Fixed by pytest-dev/pytest#6992

Comments

@blueyed
Copy link
Contributor

blueyed commented Feb 22, 2020

The removal of _tmpdirhandler from the config object (pytest-dev/pytest@8a1633c, pytest-dev/pytest#6767) breaks

if hasattr(self.config, "_tmpdirhandler"):
basetemp = self.config._tmpdirhandler.getbasetemp()
option_dict["basetemp"] = str(basetemp.join(name))
.

Tested in

def test_basetemp_in_subprocesses(self, testdir):
p1 = testdir.makepyfile(
"""
def test_send(tmpdir):
import py
assert tmpdir.relto(py.path.local(%r)), tmpdir
"""
% str(testdir.tmpdir)
)
result = testdir.runpytest_subprocess(p1, "-n1")
assert result.ret == 0
result.stdout.fnmatch_lines(["*1 passed*"])
.

Ref: 5ddef63 / #22

@RonnyPfannschmidt
Copy link
Member

im not aware of a structural fix, we might have to revert pytest-dev/pytest#6767 until we come up with one

blueyed added a commit to blueyed/pytest-xdist that referenced this issue Mar 31, 2020
Fixes pytest-dev#510.
Ref: pytest-dev/pytest#6767

Also uses `--basetemp` with `-p no:tmpdir` as a good side effect
(ref: pytest-dev#22).
blueyed added a commit to blueyed/pytest-xdist that referenced this issue Mar 31, 2020
Fixes pytest-dev#510.
Ref: pytest-dev/pytest#6767

Also uses `--basetemp` with `-p no:tmpdir` as a good side effect
(ref: pytest-dev#22).
blueyed added a commit to blueyed/pytest-xdist that referenced this issue Mar 31, 2020
Fixes pytest-dev#510.
Ref: pytest-dev/pytest#6767

Also uses `--basetemp` with `-p no:tmpdir` as a good side effect
(ref: pytest-dev#22).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants