예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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)