def test_instruction_with_label(): instruction = ppc.Instruction(1234) assert instruction.label is None with_label = instruction.with_label("foobar") assert instruction is with_label assert instruction.label == "foobar"
def test_instruction_iter(): assert _b(ppc.Instruction(1234)) == [0x00, 0x00, 0x04, 0xD2]
def test_instruction_eq(): assert ppc.Instruction(1234) == ppc.Instruction(1234)
def test_instruction_iter(): assert list(ppc.Instruction(1234).bytes_for(0)) == [0x00, 0x00, 0x04, 0xD2]