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

Function test_source_from_method

testing/code/test_source.py:40–46  ·  testing/code/test_source.py::test_source_from_method
()

Source from the content-addressed store, hash-verified

38
39
40def test_source_from_method() -> None:
41 class TestClass:
42 def test_method(self):
43 pass
44
45 source = Source(TestClass().test_method)
46 assert source.lines == [class="st">"def test_method(self):", class="st">" pass"]
47
48
49def test_source_from_lines() -> None:

Callers

nothing calls this directly

Calls 2

SourceClass · 0.90
TestClassClass · 0.70

Tested by

no test coverage detected