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

Method test_getstatementrange_bug

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getstatementrangeMethod · 0.95
SourceClass · 0.90

Tested by

no test coverage detected