diff options
author | Daniel Hahler <git@thequod.de> | 2020-01-10 00:50:12 +0100 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2020-05-30 20:02:47 -0300 |
commit | fb9f277a99c32dbdde251a1df1ae5bc64c4c7de6 (patch) | |
tree | 3614fc79f75b60bc65005a3efea3734d72f84ead /src/_pytest/nodes.py | |
parent | 56bf819c2f4eaf8b36bd8c42c06bb59d5a3bfc0f (diff) | |
download | pytest-fb9f277a99c32dbdde251a1df1ae5bc64c4c7de6.tar.gz |
Node._repr_failure_py: use abspath with changed cwd
Fixes https://github.com/pytest-dev/pytest/issues/6428.
Diffstat (limited to 'src/_pytest/nodes.py')
-rw-r--r-- | src/_pytest/nodes.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/_pytest/nodes.py b/src/_pytest/nodes.py index 4a79bc861..61c6bc90a 100644 --- a/src/_pytest/nodes.py +++ b/src/_pytest/nodes.py @@ -362,8 +362,7 @@ class Node(metaclass=NodeMeta): truncate_locals = True try: - os.getcwd() - abspath = False + abspath = os.getcwd() != str(self.config.invocation_dir) except OSError: abspath = True |