def testParseInputsLongList(self): params = JobParams() params.inputs = {"a": List("a", optional=False).ofType(rlong(0))} # List of one rv = parse_inputs(["a=1"], params) assert isinstance(rv["a"], omero.RList) assert 1 == rv["a"].val[0].val # List of two rv = parse_inputs(["a=1,2"], params) assert isinstance(rv["a"], omero.RList) assert 1 == rv["a"].val[0].val assert 2 == rv["a"].val[1].val
def testParseIntList(self): """ see ticket:7003 """ params = JobParams() a = List("Channels").ofType(rint(0)) params.inputs = {"a": a} rv = parse_inputs(["a=1,2"], params)["a"].val for x in rv: assert isinstance(x, omero.RInt) assert 1 == rv[0].val assert 2 == rv[1].val
def testParseInputsStringListIsDefault(self): params = JobParams() params.inputs = {"a": List("a", optional=False)} rv = parse_inputs(["a=1"], params) assert isinstance(rv["a"], omero.RList) assert "1" == rv["a"].val[0].val
def testTicket2323List(self): param = List('listParam', True, description='theDesc', values=[rlong(5)]) assert [5] == unwrap(param.values), str(param.values)