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

Method check_positions

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

Source from the content-addressed store, hash-verified

1410class CodeLocationTest(unittest.TestCase):
1411
1412 def check_positions(self, func):
1413 pos1 = list(func.__code__.co_positions())
1414 pos2 = list(positions_from_location_table(func.__code__))
1415 for l1, l2 in zip(pos1, pos2):
1416 self.assertEqual(l1, l2)
1417 self.assertEqual(len(pos1), len(pos2))
1418
1419 def test_positions(self):
1420 self.check_positions(parse_location_table)

Callers 1

test_positionsMethod · 0.95

Calls 3

listClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected