[7.4.x] nodes: fix tracebacks from collection errors are not getting pruned

This commit is contained in:
Ran Benita
2023-12-31 10:14:23 +02:00
committed by pytest bot
parent 5582bfcddf
commit d06c05bd23
3 changed files with 25 additions and 1 deletions

View File

@@ -567,7 +567,7 @@ class Collector(Node):
ntraceback = traceback.cut(path=self.path)
if ntraceback == traceback:
ntraceback = ntraceback.cut(excludepath=tracebackcutdir)
return excinfo.traceback.filter(excinfo)
return ntraceback.filter(excinfo)
return excinfo.traceback