def testTicket2323(self): SCRIPT = """ if True: import omero from omero.rtypes import rstring, rlong import omero.scripts as scripts client = scripts.client( 'HelloWorld.py', 'Hello World example script', scripts.Long('longParam', True, description='theDesc', min=long(1), max=long(10), values=[rlong(5)]) ) client.setOutput('returnMessage', rstring('Script ran OK!'))""" params = parse_text(SCRIPT) longParam = params.inputs["longParam"] assert 1 == unwrap(longParam.min), str(longParam.min) assert 10 == unwrap(longParam.max), str(longParam.max) assert [5] == unwrap(longParam.values), str(longParam.values)
def parse_list(self, SCRIPT): params = parse_text(SCRIPT) l = params.inputs["l"] assert l.useDefault, str(l) assert ["a"] == unwrap(l.prototype)