53059cec9053a8429b7f0a8f06e6cbe1672b60e7,cellprofiler/modules/tests/test_groups.py,TestGroups,test_02_01_group_on_one,#TestGroups#,118
Before Change
groups.wants_groups.value = True
groups.grouping_metadata[0].image_name.value = "DNA"
groups.grouping_metadata[0].metadata_choice.value = "Plate"
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), 1)
self.assertEqual(key_list[0], (0, "Plate"))
self.assertEqual(len(groupings), 2)
for plate in ("P-12345", "P-23456"):
self.assertTrue(groupings.has_key((plate,)))
image_set_list = groupings[(plate,)]
self.assertEqual(len(image_set_list), 3 * 4)
expected_image_set_list = \
sorted(filter(lambda x: x[0] == plate, image_sets.keys()))
for image_set_key, expected_image_set_key in zip(
image_set_list, expected_image_set_list):
self.assertEqual(image_set_key, expected_image_set_key)
def test_02_01_group_on_two(self):
groups = G.Groups()
groups.wants_groups.value = True
groups.grouping_metadata[0].image_name.value = "GFP"
After Change
for image_number in range(1 + (group_number-1) * 12,
1 + group_number * 12):
for image_name in ("DNA", "GFP"):
ftr = "_".join((cpmeas.C_FILE_NAME, image_name))
self.assertTrue(
m[cpmeas.IMAGE, ftr, image_number].startswith(plate))
def test_02_01_group_on_two(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
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_01_group_on_one
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
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