53059cec9053a8429b7f0a8f06e6cbe1672b60e7,cellprofiler/modules/tests/test_groups.py,TestGroups,test_02_00_compute_no_groups,#TestGroups#,98

Before Change


    def test_02_00_compute_no_groups(self):
        groups = G.Groups()
        groups.wants_groups.value = False
        iscds, image_set_key_names, image_sets = self.make_image_sets(
            (("Plate", ("P-12345", "P-23456")),
             ("Well", ("A01", "A02", "A03")),
             ("Site", ("1", "2", "3", "4"))),
            (("DNA", "Wavelength", "1", cpp.Pipeline.ImageSetChannelDescriptor.CT_GRAYSCALE),
             ("GFP", "Wavelength", "1", cpp.Pipeline.ImageSetChannelDescriptor.CT_GRAYSCALE)))
        key_list, groupings = groups.compute_groups(
            iscds, image_set_key_names, image_sets)
        self.assertEqual(len(key_list), 0)
        self.assertEqual(len(groupings), 1)
        self.assertEqual(groupings.keys()[0], ())
        image_set_list = groupings.values()[0]
        self.assertEqual(len(image_set_list), 2 * 3 * 4)
        for image_set_key, expected_image_set_key in zip(
            image_set_list, sorted(image_sets.keys())):
            self.assertEqual(image_set_key, expected_image_set_key)
            
    def test_02_01_group_on_one(self):
        groups = G.Groups()
        groups.wants_groups.value = True
        groups.grouping_metadata[0].image_name.value = "DNA"

After Change


        groups = G.Groups()
        groups.wants_groups.value = False
        m = workspace.measurements
        assert isinstance(m, cpmeas.Measurements)
        image_numbers = m.get_image_numbers()
        expected_file_names = m[cpmeas.IMAGE, cpmeas.C_FILE_NAME + "_" + "DNA", image_numbers]
        self.assertTrue(groups.prepare_run(workspace))
        self.assertEqual(len(image_numbers), 2 * 3 * 4)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: CellProfiler/CellProfiler
Commit Name: 53059cec9053a8429b7f0a8f06e6cbe1672b60e7
Time: 2013-01-16
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/tests/test_groups.py
Class Name: TestGroups
Method Name: test_02_00_compute_no_groups


Project Name: CellProfiler/CellProfiler
Commit Name: 53059cec9053a8429b7f0a8f06e6cbe1672b60e7
Time: 2013-01-16
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/tests/test_groups.py
Class Name: TestGroups
Method Name: test_02_01_group_on_two


Project Name: CellProfiler/CellProfiler
Commit Name: 53059cec9053a8429b7f0a8f06e6cbe1672b60e7
Time: 2013-01-16
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/tests/test_groups.py
Class Name: TestGroups
Method Name: test_02_00_compute_no_groups


Project Name: CellProfiler/CellProfiler
Commit Name: 53059cec9053a8429b7f0a8f06e6cbe1672b60e7
Time: 2013-01-16
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/tests/test_groups.py
Class Name: TestGroups
Method Name: test_02_01_group_on_one