Exemplo n.º 1
0
    def test_setup_data_dir(self):
        root = os.path.join(os.path.dirname(__file__), "./tmp_root")
        os.mkdir(root)

        storage = Storage.setup_data_dir(root)
        self.assertTrue(os.path.exists(storage.data_path("raw")))
        self.assertTrue(os.path.exists(storage.data_path("processed")))
        self.assertTrue(os.path.exists(storage.data_path("interim")))
        self.assertTrue(os.path.exists(storage.data_path("external")))
        shutil.rmtree(root)
Exemplo n.º 2
0
    def test_setup_data_dir(self):
        root = os.path.join(os.path.dirname(__file__), "./tmp_root")
        os.mkdir(root)

        storage = Storage.setup_data_dir(root)
        self.assertTrue(os.path.exists(storage.raw()))
        self.assertTrue(os.path.exists(storage.processed()))
        self.assertTrue(os.path.exists(storage.interim()))
        self.assertTrue(os.path.exists(storage.external()))
        shutil.rmtree(root)