Ejemplo n.º 1
0
    def test_collate_annotations_with_list_and_scalar(self):
        truth = [1, 2, 3]
        one_and_two = AnnotatedImage(INFO_F0, truth[:2])
        three = AnnotatedImage(INFO_F0, truth[2])

        collated = one_and_two.collate_annotations_with(three)
        self.assertEqual(collated.annotation, truth)
Ejemplo n.º 2
0
    def test_collate_annotations_with_when_images_with_scalar_data(self):
        truth = [1, 2]
        one = AnnotatedImage(INFO_F0, truth[0])
        two = AnnotatedImage(INFO_F0, truth[1])

        collated = one.collate_annotations_with(two)
        self.assertEqual(collated.annotation, truth)
Ejemplo n.º 3
0
 def test_collate_annotations_with_list_and_tuple(self):
     truth = [1, 2, 3, 4]
     one_and_two = AnnotatedImage(INFO_F0, truth[:2])
     three_and_four = AnnotatedImage(INFO_F0, tuple(truth[2:]))
     collated = one_and_two.collate_annotations_with(three_and_four)
     self.assertEqual(collated.annotation, truth)
Ejemplo n.º 4
0
 def test_collate_annotations_with_scalar_and_list(self):
     truth = [1, 2, 3]
     one = AnnotatedImage(INFO_F0, truth[0])
     two_and_three = AnnotatedImage(INFO_F0, truth[1:])
     collated = one.collate_annotations_with(two_and_three)
     self.assertEqual(collated.annotation, truth)