MCPcopy Create free account
hub / github.com/pytest-dev/pytest / source

Method source

src/_pytest/_code/code.py:109–112  ·  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

107 return full
108
109 def source(self) -> "Source":
110 """Return a _pytest._code.Source object for the code object's source only."""
111 # return source only for that part of code
112 return Source(self.raw)
113
114 def getargs(self, var: bool = False) -> Tuple[str, ...]:
115 """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