def testGrouping(self): SCRIPT = """if True: from omero.scripts import * c = client('testGrouping', Long('these', grouping="A.1"), Long('belong', grouping="A.2"), Long('together', grouping="A.3"))""" params = parse_text(SCRIPT) groupings = group_params(params) assert "these" == groupings["A"]["1"], str(groupings) assert "belong" == groupings["A"]["2"], str(groupings) assert "together" == groupings["A"]["3"], str(groupings)
def testGroupingWithMain(self): SCRIPT = """if True: from omero.scripts import * c = client('testGrouping', Bool('checkbox', grouping="A"), Long('these', grouping="A.1"), Long('belong', grouping="A.2"), Long('together', grouping="A.3"))""" params = parse_text(SCRIPT) groupings = group_params(params) try: assert "checkbox" == groupings["A"][""], str(groupings) assert "these" == groupings["A"]["1"], str(groupings) assert "belong" == groupings["A"]["2"], str(groupings) assert "together" == groupings["A"]["3"], str(groupings) except KeyError: assert False, str(groupings)