MCPcopy
hub / github.com/pytest-dev/pytest / getargs

Method getargs

src/_pytest/_code/code.py:179–191  ·  view source on GitHub ↗

Return a list of tuples (name, value) for all arguments. If 'var' is set True, also include the variable and keyword arguments when present.

(self, var: bool = False)

Source from the content-addressed store, hash-verified

177 return saferepr(object)
178
179 def getargs(self, var: bool = False):
180 """Return a list of tuples (name, value) for all arguments.
181
182 If 'var' is set True, also include the variable and keyword arguments
183 when present.
184 """
185 retval = []
186 for arg in self.code.getargs(var):
187 try:
188 retval.append((arg, self.f_locals[arg]))
189 except KeyError:
190 pass # this can occur when using Psyco
191 return retval
192
193
194class TracebackEntry:

Callers 1

test_frame_getargsFunction · 0.95

Calls 2

appendMethod · 0.80
getargsMethod · 0.45

Tested by 1

test_frame_getargsFunction · 0.76