def test_download(self, mock_download): path = os.path.join(os.path.dirname(__file__), "./data") storage = Storage(path) storage.chakin(lang="Japanese") vec_path = storage.chakin(name="fastText(ja)") self.assertTrue(os.path.exists(vec_path)) os.remove(vec_path)
def test_download_zip(self, mock_download): path = os.path.join(os.path.dirname(__file__), "./data") storage = Storage(path) vec_path = storage.chakin(name="fastText(ja)") print(vec_path) self.assertTrue(os.path.exists(vec_path)) self.assertTrue( Path(vec_path).joinpath("word2vec_dummy2.txt").exists()) shutil.rmtree(vec_path)