From f180ab3e69438559df309e8eac563499bde4fba2 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 20 Nov 2018 20:08:01 -0200 Subject: [PATCH] Use os.path.abspath to get absolute path instead of Path.resolve() Unfortunately it seems there is a difference in resolve() behavior depending on the platform --- src/_pytest/tmpdir.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_pytest/tmpdir.py b/src/_pytest/tmpdir.py index 81430e4f0..937d90c2f 100644 --- a/src/_pytest/tmpdir.py +++ b/src/_pytest/tmpdir.py @@ -27,7 +27,9 @@ class TempPathFactory(object): The base directory can be configured using the ``--basetemp`` option.""" _given_basetemp = attr.ib( - convert=attr.converters.optional(lambda p: Path(p).resolve()) + # using os.path.abspath() to get absolute path instead of resolve() as it + # does not work the same in all platforms + convert=attr.converters.optional(lambda p: Path(os.path.abspath(p))) ) _trace = attr.ib() _basetemp = attr.ib(default=None)