def test_english(self): create_corpus_from_po( os.path.join(TEST_PATH, "test_files", "about.po"), os.path.join(TEST_PATH, "temp_files", "source.txt"), os.path.join(TEST_PATH, "temp_files", "target.txt")) with open(os.path.join(TEST_PATH, "temp_files", "source.txt")) as f: self.assertEqual(f.read().strip(), "About MongoDB Documentation\nLicense")
def test_spanish(self): create_corpus_from_po( os.path.join(TEST_PATH, "test_files", "about.po"), os.path.join(TEST_PATH, "temp_files", "source.txt"), os.path.join(TEST_PATH, "temp_files", "target.txt")) with open(os.path.join(TEST_PATH, "temp_files", "target.txt")) as f: self.assertEqual( f.read().strip(), "Acerca de la documentacion de MongoDB\nLicencia")
def po_to_corpus(args): create_corpus_from_po(args.t_input_file, args.t_source, args.t_target)
def test_spanish(self): create_corpus_from_po(os.path.join(TEST_PATH, "test_files", "about.po"), os.path.join(TEST_PATH, "temp_files", "source.txt"), os.path.join(TEST_PATH, "temp_files", "target.txt")) with open(os.path.join(TEST_PATH,"temp_files", "target.txt")) as f: self.assertEqual(f.read().strip(), "Acerca de la documentacion de MongoDB\nLicencia")
def test_english(self): create_corpus_from_po(os.path.join(TEST_PATH, "test_files", "about.po"), os.path.join(TEST_PATH, "temp_files", "source.txt"), os.path.join(TEST_PATH,"temp_files", "target.txt")) with open(os.path.join(TEST_PATH,"temp_files","source.txt")) as f: self.assertEqual(f.read().strip(), "About MongoDB Documentation\nLicense")