示例#1
0
    def test_iterators(self):
        images = [i for i in LifFile("./tests/xyzt_test.lif").get_iter_image()]
        self.assertEqual(len(images), 1)

        obj = LifFile("./tests/xyzt_test.lif").get_image(0)

        c_list = [i for i in obj.get_iter_c()]
        self.assertEqual(len(c_list), 2)

        t_list = [i for i in obj.get_iter_t()]
        self.assertEqual(len(t_list), 3)

        z_list = [i for i in obj.get_iter_z()]
        self.assertEqual(len(z_list), 3)
示例#2
0
文件: test.py 项目: jojoelfe/readlif
    def test_iterators(self):
        images = [i for i in LifFile("./tests/xyzt_test.lif").get_iter_image()]
        self.assertEqual(len(images), 1)

        obj = LifFile("./tests/xyzt_test.lif").get_image(0)
        self.assertEqual(repr(obj), "'LifImage object with "
                                    "dimensions: "
                                    "Dims(x=1024, y=1024, z=3, t=3, m=1)'")

        c_list = [i for i in obj.get_iter_c()]
        self.assertEqual(len(c_list), 2)

        t_list = [i for i in obj.get_iter_t()]
        self.assertEqual(len(t_list), 3)

        z_list = [i for i in obj.get_iter_z()]
        self.assertEqual(len(z_list), 3)