Skip to content

Commit

Permalink
add test for txt cbeta
Browse files Browse the repository at this point in the history
  • Loading branch information
kylepjohnson committed Mar 5, 2016
1 parent 760aca1 commit e89e7b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cltk/tests/test_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,15 @@ def test_git_import_tib_lexica_tdc(self):
file_exists = os.path.isfile(file)
self.assertTrue(file_exists)

def test_git_import_chinese_cbeta_txt(self):
"""Test import of plaintext CBETA."""
corpus_importer = CorpusImporter('chinese')
corpus_importer.import_corpus('chinese_text_cbeta_txt')
file_rel = os.path.join('~/cltk_data/chinese/text/chinese_text_cbeta_txt/README.md')
file = os.path.expanduser(file_rel)
file_exists = os.path.isfile(file)
self.assertTrue(file_exists)

def test_show_corpora_bad_lang(self):
"""Test failure of importer upon selecting unsupported language."""
with self.assertRaises(AssertionError):
Expand Down

0 comments on commit e89e7b6

Please sign in to comment.