MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_lines

Method check_lines

Lib/test/test_code.py:1421–1428  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

1419 self.check_positions(bug93662)
1420
1421 def check_lines(self, func):
1422 co = func.__code__
1423 lines1 = [line for _, _, line in co.co_lines()]
1424 self.assertEqual(lines1, list(dedup(lines1)))
1425 lines2 = list(lines_from_postions(positions_from_location_table(co)))
1426 for l1, l2 in zip(lines1, lines2):
1427 self.assertEqual(l1, l2)
1428 self.assertEqual(len(lines1), len(lines2))
1429
1430 def test_lines(self):
1431 self.check_lines(parse_location_table)

Callers 1

test_linesMethod · 0.95

Calls 7

listClass · 0.85
dedupFunction · 0.85
lines_from_postionsFunction · 0.85
lenFunction · 0.85
co_linesMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected