Also remove a superfluous empty line in test file.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
type(state))
if "instances" in state:
- insts = [OpCode.LoadOpCode(inst) for inst in state["instances"]]
- state["instances"] = insts
+ state["instances"] = map(OpCode.LoadOpCode, state["instances"])
+
return OpCode.__setstate__(self, state)
def Validate(self, set_defaults):
self.assertEqual(op.value2, "world")
self.assertEqual(op.debug_level, 123)
-
def testOpInstanceMultiAlloc(self):
inst = dict([(name, []) for name in opcodes.OpInstanceCreate.GetAllSlots()])
inst_op = opcodes.OpInstanceCreate(**inst)