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

Method source

src/_pytest/_code/code.py:108–111  ·  view source on GitHub ↗

Return a _pytest._code.Source object for the code object's source only.

(self)

Source from the content-addressed store, hash-verified

106 return full
107
108 def source(self) -> Source:
109 """Return a _pytest._code.Source object for the code object's source only."""
110 # return source only for that part of code
111 return Source(self.raw)
112
113 def getargs(self, var: bool = False) -> tuple[str, ...]:
114 """Return a tuple with the argument names for the code object.

Callers 3

getmsgFunction · 0.80
test_code_sourceFunction · 0.80

Calls 1

SourceClass · 0.90

Tested by 3

getmsgFunction · 0.64
test_code_sourceFunction · 0.64