def test_byte_generation(self): bytes = bytearray(NoOperation()) self.assertEqual(len(bytes), 0)
def __init__(self, operation=NoOperation()): self.operation = operation super(Action, self).__init__()
def test_constructor_and_op_code(self): nop = NoOperation() self.assertEqual(nop.op, 0) self.assertIsNone(nop.operand)
def __init__(self, resp=False, operation=NoOperation()): self.resp = resp super(ForwardAction, self).__init__(operation)
def __init__(self, overload=False, resp=False, operation=NoOperation()): self.overload = overload self.resp = resp super(IndirectForwardAction, self).__init__(operation)
def __init__(self, respond_when_completed=True, operation=NoOperation()): self.respond_when_completed = respond_when_completed super(TagRequestAction, self).__init__(operation)
def __init__(self, group=False, resp=False, operation=NoOperation()): self.group = group self.resp = resp super(RegularAction, self).__init__(operation)
def __init__(self, eop, error, operation=NoOperation()): self.eop = eop self.error = error super(TagResponseAction, self).__init__(operation)