MCPcopy Index your code
hub / github.com/python/cpython / check_lines

Method check_lines

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

Source from the content-addressed store, hash-verified

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

Callers 1

test_linesMethod · 0.95

Calls 5

listClass · 0.85
dedupFunction · 0.85
lines_from_postionsFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected