class TestExporterMATLAB(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.tmpdir = tempfile.mkdtemp() self.exp = ExporterMATLAB() 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)