コード例 #1
0
    def test_write_file__xls(self):
        target_file = Path(
            "./greatpublicationplanner/tests/examples/list_conf.xls")
        conf = file_manager.read_file(target_file)

        target_file = Path("./greatpublicationplanner/tests/dump_data.xls")
        file_manager.write_file(conf, target_file)
        dump = file_manager.read_file(target_file)
        self.assertTrue(dump.equals(conf))
        target_file.unlink()
コード例 #2
0
 def test_read_file__xlsx(self):
     target_file = Path(
         "./greatpublicationplanner/tests/examples/list_conf.xlsx")
     conf = file_manager.read_file(target_file)
     self.assertIsInstance(conf, DataFrame)
コード例 #3
0
 def test_write_file__not_supported(self):
     target_file = Path("./greatpublicationplanner/tests/dump_data.toto")
     with self.assertRaises(ValueError):
         file_manager.read_file(target_file)
コード例 #4
0
 def test_read_file__not_supported(self):
     target_file = Path(
         "./greatpublicationplanner/tests/examples/list_conf.toto")
     with self.assertRaises(ValueError):
         file_manager.read_file(target_file)