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

Method test_getstatementrange_bug

testing/code/test_source.py:162–174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 assert source.getstatementrange(6) == (6, 7)
161
162 def test_getstatementrange_bug(self) -> None:
163 source = Source(
164 """\
165 try:
166 x = (
167 y +
168 z)
169 except:
170 pass
171 """
172 )
173 assert len(source) == 6
174 assert source.getstatementrange(2) == (1, 4)
175
176 def test_getstatementrange_bug2(self) -> None:
177 source = Source(

Callers

nothing calls this directly

Calls 2

getstatementrangeMethod · 0.95
SourceClass · 0.90

Tested by

no test coverage detected