Lines Matching refs:opcodes
772 opcodes = list(dis.get_instructions(func))
773 self.assertLessEqual(len(opcodes), 3)
774 self.assertEqual('LOAD_CONST', opcodes[-2].opname)
775 self.assertEqual(None, opcodes[-2].argval)
776 self.assertEqual('RETURN_VALUE', opcodes[-1].opname)
791 opcodes = list(dis.get_instructions(func))
792 self.assertEqual(2, len(opcodes))
793 self.assertEqual('LOAD_CONST', opcodes[0].opname)
794 self.assertEqual(None, opcodes[0].argval)
795 self.assertEqual('RETURN_VALUE', opcodes[1].opname)
815 opcodes = list(dis.get_instructions(func))
816 self.assertEqual(2, len(opcodes))
817 self.assertIn('LOAD_', opcodes[0].opname)
818 self.assertEqual('RETURN_VALUE', opcodes[1].opname)