Lines Matching refs:dis
7 import dis
414 dis.dis(func, **kwargs)
416 dis.disassemble(func, lasti, **kwargs)
432 self.assertEqual(dis.opmap["NOP"], 9)
433 self.assertIn(dis.opmap["LOAD_CONST"], dis.hasconst)
434 self.assertIn(dis.opmap["STORE_NAME"], dis.hasname)
437 self.assertEqual(dis.opname[dis.opmap["LOAD_FAST"]], "LOAD_FAST")
440 self.assertEqual(dis.opmap["EXTENDED_ARG"], dis.EXTENDED_ARG)
441 self.assertEqual(dis.opmap["STORE_NAME"], dis.HAVE_ARGUMENT)
444 for opcode, opname in enumerate(dis.opname):
449 width = dis._OPNAME_WIDTH
450 if opcode < dis.HAVE_ARGUMENT:
451 width += 1 + dis._OPARG_WIDTH
570 self.assertRaises(RuntimeError, dis.dis, None)
588 self.assertRaises(TypeError, dis.dis, object())
592 dis = self.get_disassembly(_h, **kwargs)
593 dis = self.strip_addresses(dis)
594 self.assertEqual(dis, expected)
610 dis.dis(func, file=output, **kwargs)
612 dis.disassemble(func, lasti, file=output, **kwargs)
756 (dis.code_info, code_info_code_info),
768 self.assertRegex(dis.code_info(x), expected)
774 dis.show_code(x)
777 dis.show_code(x, file=output)
781 self.assertRaises(TypeError, dis.code_info, object())
784 self.assertEqual(dis.pretty_flags(0), '0x0')
855 Instruction = dis.Instruction
1026 actual = dis.get_instructions(simple)
1030 actual = dis.get_instructions(simple, first_line=None)
1034 actual = dis.get_instructions(outer, first_line=expected_outer_line)
1040 actual = dis.get_instructions(f, first_line=expected_f_line)
1046 actual = dis.get_instructions(inner, first_line=expected_inner_line)
1050 actual = dis.get_instructions(jumpy, first_line=expected_jumpy_line)
1060 b = dis.Bytecode(obj)
1063 self.assertRaises(TypeError, dis.Bytecode, object())
1068 via_object = list(dis.Bytecode(obj))
1069 via_generator = list(dis.get_instructions(obj))
1073 actual = dis.Bytecode(outer, first_line=expected_outer_line)
1078 actual = dis.Bytecode(simple).dis()
1083 actual = dis.Bytecode(simple, first_line=350).dis()
1090 b = dis.Bytecode(x)
1094 actual = dis.Bytecode(_f).dis()
1099 b = dis.Bytecode.from_traceback(tb)
1106 b = dis.Bytecode.from_traceback(tb)
1107 self.assertEqual(b.dis(), dis_traceback)