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

Method assert_exception_table_increasing

Lib/test/test_dis.py:980–990  ·  view source on GitHub ↗
(self, lines)

Source from the content-addressed store, hash-verified

978 return re.sub(r'\b0x[0-9A-Fa-f]+\b', '0x...', text)
979
980 def assert_exception_table_increasing(self, lines):
981 prev_start, prev_end = -1, -1
982 count = 0
983 for line in lines:
984 m = re.match(r' L(\d+) to L(\d+) -> L\d+ \[\d+\]', line)
985 start, end = [int(g) for g in m.groups()]
986 self.assertGreaterEqual(end, start)
987 self.assertGreaterEqual(start, prev_end)
988 prev_start, prev_end = start, end
989 count += 1
990 return count
991
992 def do_disassembly_compare(self, got, expected):
993 if got != expected:

Callers

nothing calls this directly

Calls 3

assertGreaterEqualMethod · 0.80
matchMethod · 0.45
groupsMethod · 0.45

Tested by

no test coverage detected