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
|
||||
|
||||
try:
|
||||
os.getcwd()
|
||||
abspath = False
|
||||
abspath = os.getcwd() != str(self.config.invocation_dir)
|
||||
except OSError:
|
||||
abspath = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue