fix #4680 - ensure tmpdir and tmp_path are the same

This commit is contained in:
Ronny Pfannschmidt
2019-01-27 13:05:34 +01:00
parent 9905a73ae0
commit f7d7555521
3 changed files with 7 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ def _mk_tmp(request, factory):
@pytest.fixture
def tmpdir(request, tmpdir_factory):
def tmpdir(tmp_path):
"""Return a temporary directory path object
which is unique to each test function invocation,
created as a sub directory of the base temporary
@@ -176,7 +176,7 @@ def tmpdir(request, tmpdir_factory):
.. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html
"""
return _mk_tmp(request, tmpdir_factory)
return py.path.local(tmp_path)
@pytest.fixture