示例#1
0
 def test_download_apequest(self, mock_stdout):
     download_corpus("apequest", DATA_PATH)
     self.assertTrue(os.path.isdir(DATA_PATH + "apequest"))
     self.assertIn("Download succeeded.", mock_stdout.getvalue())
     download_corpus("apequest", DATA_PATH)
     self.assertIn("apequest is already in cache.", mock_stdout.getvalue())
     shutil.rmtree(DATA_PATH + "apequest")
示例#2
0
文件: cli.py 项目: patelrajnath/COMET
def download(data, model, saving_path):
    for d in data:
        download_corpus(d, saving_path)

    for m in model:
        download_model(m, saving_path)
示例#3
0
 def test_download_docwmt19(self, mock_stdout):
     download_corpus("doc-wmt19", DATA_PATH)
     self.assertTrue(os.path.isdir(DATA_PATH + "doc-wmt19"))
     self.assertIn("Download succeeded.", mock_stdout.getvalue())
     shutil.rmtree(DATA_PATH + "doc-wmt19")
示例#4
0
 def test_download_wmt(self, mock_stdout):
     download_corpus("wmt-metrics", DATA_PATH)
     self.assertTrue(os.path.isdir(DATA_PATH + "wmt-metrics"))
     self.assertIn("Download succeeded.", mock_stdout.getvalue())
     shutil.rmtree(DATA_PATH + "wmt-metrics")