We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3db440 commit 2ee9088Copy full SHA for 2ee9088
src/_pytest/_code/code.py
@@ -268,18 +268,14 @@ def ishidden(self):
268
return tbh
269
270
def __str__(self) -> str:
271
- try:
272
- fn = str(self.path)
273
- except py.error.Error:
274
- fn = "???"
275
name = self.frame.code.name
276
try:
277
line = str(self.statement).lstrip()
278
except KeyboardInterrupt:
279
raise
280
except BaseException:
281
line = "???"
282
- return " File %r:%d in %s\n %s\n" % (fn, self.lineno + 1, name, line)
+ return " File %r:%d in %s\n %s\n" % (self.path, self.lineno + 1, name, line)
283
284
@property
285
def name(self) -> str:
0 commit comments