• Home
  • Raw
  • Download

Lines Matching refs:dis

7 import dis
496 dis.dis(func, **kwargs)
498 dis.disassemble(func, lasti, **kwargs)
514 self.assertEqual(dis.opmap["NOP"], 9)
515 self.assertIn(dis.opmap["LOAD_CONST"], dis.hasconst)
516 self.assertIn(dis.opmap["STORE_NAME"], dis.hasname)
519 self.assertEqual(dis.opname[dis.opmap["LOAD_FAST"]], "LOAD_FAST")
522 self.assertEqual(dis.opmap["EXTENDED_ARG"], dis.EXTENDED_ARG)
523 self.assertEqual(dis.opmap["STORE_NAME"], dis.HAVE_ARGUMENT)
526 for opcode, opname in enumerate(dis.opname):
532 width = dis._OPNAME_WIDTH
533 if opcode < dis.HAVE_ARGUMENT:
534 width += 1 + dis._OPARG_WIDTH
664 self.assertRaises(RuntimeError, dis.dis, None)
682 self.assertRaises(TypeError, dis.dis, object())
686 dis = self.get_disassembly(_h, **kwargs)
687 dis = self.strip_addresses(dis)
688 self.assertEqual(dis, expected)
704 dis.dis(func, file=output, **kwargs)
706 dis.disassemble(func, lasti, file=output, **kwargs)
867 (dis.code_info, code_info_code_info),
879 self.assertRegex(dis.code_info(x), expected)
885 dis.show_code(x)
888 dis.show_code(x, file=output)
892 self.assertRaises(TypeError, dis.code_info, object())
895 self.assertEqual(dis.pretty_flags(0), '0x0')
966 Instruction = dis.Instruction
1165 actual = dis.get_instructions(simple)
1169 actual = dis.get_instructions(simple, first_line=None)
1173 actual = dis.get_instructions(outer, first_line=expected_outer_line)
1179 actual = dis.get_instructions(f, first_line=expected_f_line)
1185 actual = dis.get_instructions(inner, first_line=expected_inner_line)
1189 actual = dis.get_instructions(jumpy, first_line=expected_jumpy_line)
1200 b = dis.Bytecode(obj)
1203 self.assertRaises(TypeError, dis.Bytecode, object())
1208 via_object = list(dis.Bytecode(obj))
1209 via_generator = list(dis.get_instructions(obj))
1213 actual = dis.Bytecode(outer, first_line=expected_outer_line)
1218 actual = dis.Bytecode(simple).dis()
1223 actual = dis.Bytecode(simple, first_line=350).dis()
1230 b = dis.Bytecode(x)
1234 actual = dis.Bytecode(_f).dis()
1239 b = dis.Bytecode.from_traceback(tb)
1246 b = dis.Bytecode.from_traceback(tb)
1247 self.assertEqual(b.dis(), dis_traceback)
1280 dis.distb(tb)
1285 dis.distb()
1305 dis.distb(tb, file=output)