Example #1
0
    def setUp(self):
        unittest.TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()
        self.exp = ExporterTIFFMultiPage(compress=9)

        self.datafile = _create_datafile()
Example #2
0
    def setUp(self):
        unittest.TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()
        self.exp = ExporterTIFFMultiPage(compress=9)

        self.datafile = _create_datafile()
Example #3
0
class TestExporterTIFFMultiPage(unittest.TestCase):
    def setUp(self):
        unittest.TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()
        self.exp = ExporterTIFFMultiPage(compress=9)

        self.datafile = _create_datafile()

    def tearDown(self):
        unittest.TestCase.tearDown(self)
        shutil.rmtree(self.tmpdir, ignore_errors=True)

    def testexport(self):
        self.exp.export(self.datafile, self.tmpdir)
        filepaths = self.exp.get()

        self.assertEqual(len(filepaths), 1)

        with tifffile.TiffFile(filepaths[0]) as tif:
            self.assertEqual(len(tif.pages), len(_SUPPORTED_DTYPES))
Example #4
0
class TestExporterTIFFMultiPage(unittest.TestCase):

    def setUp(self):
        unittest.TestCase.setUp(self)

        self.tmpdir = tempfile.mkdtemp()
        self.exp = ExporterTIFFMultiPage(compress=9)

        self.datafile = _create_datafile()

    def tearDown(self):
        unittest.TestCase.tearDown(self)
        shutil.rmtree(self.tmpdir, ignore_errors=True)

    def testexport(self):
        self.exp.export(self.datafile, self.tmpdir)
        filepaths = self.exp.get()

        self.assertEqual(len(filepaths), 1)

        with tifffile.TiffFile(filepaths[0]) as tif:
            self.assertEqual(len(tif), len(_SUPPORTED_DTYPES))