Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/_pytest/_code/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ def path(self) -> Union[py.path.local, str]:
# maybe don't try this checking
if not p.check():
raise OSError("py.path check failed.")
return p
except OSError:
# XXX maybe try harder like the weird logic
# in the standard lib [linecache.updatecache] does?
p = self.raw.co_filename

return p
return self.raw.co_filename

@property
def fullsource(self) -> Optional["Source"]:
Expand Down