Ejemplo n.º 1
0
        def test_slice_plate_image(self, image_circle):
            plates = PlateCollection(shape=(1, 1))
            plates.add(id=1, diameter=180, edge_cut=20, center=(102, 102))

            images = plates.slice_plate_image(image_circle)

            assert len(images) == 1
            assert images[1].shape == (141, 141)
Ejemplo n.º 2
0
        def test_centers(self):
            centers = list()
            collection = PlateCollection()
            for i in range(1, 10):
                center = (i, i)
                centers.append(center)
                collection.add(id=i, diameter=1, center=center)

            assert collection.count == len(centers)
            assert collection.centers == centers
Ejemplo n.º 3
0
        def test_add(self, id, diameter):
            collection = PlateCollection()
            item_new = collection.add(id=id, diameter=diameter)

            assert collection.count == 1
            assert item_new in collection.items