(self)
| 1059 | |
| 1060 | @requires_debug_ranges() |
| 1061 | def test_dis_with_all_positions(self): |
| 1062 | def format_instr_positions(instr): |
| 1063 | values = tuple('?' if p is None else p for p in instr.positions) |
| 1064 | return '%s:%s-%s:%s' % (values[0], values[2], values[1], values[3]) |
| 1065 | |
| 1066 | instrs = list(dis.get_instructions(_f)) |
| 1067 | for instr in instrs: |
| 1068 | with self.subTest(instr=instr): |
| 1069 | self.assertTrue(all(p is not None for p in instr.positions)) |
| 1070 | positions = tuple(map(format_instr_positions, instrs)) |
| 1071 | expected = dis_f_with_positions_format % positions |
| 1072 | self.do_disassembly_test(_f, expected, show_positions=True) |
| 1073 | |
| 1074 | @requires_debug_ranges() |
| 1075 | def test_dis_with_some_positions(self): |
nothing calls this directly
no test coverage detected