Merge pull request #1525 from The-Compiler/traceback-item
Fix TracebackItem documentation in pytest.code
This commit is contained in:
commit
a986b8f945
|
@ -294,11 +294,11 @@ class Traceback(list):
|
||||||
def filter(self, fn=lambda x: not x.ishidden()):
|
def filter(self, fn=lambda x: not x.ishidden()):
|
||||||
""" return a Traceback instance with certain items removed
|
""" return a Traceback instance with certain items removed
|
||||||
|
|
||||||
fn is a function that gets a single argument, a TracebackItem
|
fn is a function that gets a single argument, a TracebackEntry
|
||||||
instance, and should return True when the item should be added
|
instance, and should return True when the item should be added
|
||||||
to the Traceback, False when not
|
to the Traceback, False when not
|
||||||
|
|
||||||
by default this removes all the TracebackItems which are hidden
|
by default this removes all the TracebackEntries which are hidden
|
||||||
(see ishidden() above)
|
(see ishidden() above)
|
||||||
"""
|
"""
|
||||||
return Traceback(filter(fn, self))
|
return Traceback(filter(fn, self))
|
||||||
|
@ -314,7 +314,7 @@ class Traceback(list):
|
||||||
return self[-1]
|
return self[-1]
|
||||||
|
|
||||||
def recursionindex(self):
|
def recursionindex(self):
|
||||||
""" return the index of the frame/TracebackItem where recursion
|
""" return the index of the frame/TracebackEntry where recursion
|
||||||
originates if appropriate, None if no recursion occurred
|
originates if appropriate, None if no recursion occurred
|
||||||
"""
|
"""
|
||||||
cache = {}
|
cache = {}
|
||||||
|
|
Loading…
Reference in New Issue