summaryrefslogtreecommitdiff
path: root/src/_pytest/tmpdir.py
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2018-11-20 20:08:01 -0200
committerBruno Oliveira <nicoddemus@gmail.com>2018-11-20 20:08:01 -0200
commitf180ab3e69438559df309e8eac563499bde4fba2 (patch)
treef8cdef21bee4e0100afe4ca8bf1e90dca173bfc8 /src/_pytest/tmpdir.py
parentfc61bdd9073d86819eb54c8603384a10c626a9d4 (diff)
downloadpytest-f180ab3e69438559df309e8eac563499bde4fba2.tar.gz
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
Diffstat (limited to 'src/_pytest/tmpdir.py')
-rw-r--r--src/_pytest/tmpdir.py4
1 files changed, 3 insertions, 1 deletions
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)