Node._repr_failure_py: use abspath with changed cwd
Fixes https://github.com/pytest-dev/pytest/issues/6428.
This commit is contained in:
parent
56bf819c2f
commit
fb9f277a99
|
@ -362,8 +362,7 @@ class Node(metaclass=NodeMeta):
|
||||||
truncate_locals = True
|
truncate_locals = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.getcwd()
|
abspath = os.getcwd() != str(self.config.invocation_dir)
|
||||||
abspath = False
|
|
||||||
except OSError:
|
except OSError:
|
||||||
abspath = True
|
abspath = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue