def test_cached_phrases_cached_files(self,
corpus_base_path,
doc_content_stream):
# TODO: this test should be improved. Text quality should be tested
from eea.corpus.processing.phrases.process import cached_phrases
from pkg_resources import resource_filename
base_path = resource_filename('eea.corpus', 'tests/fixtures/')
corpus_base_path.return_value = base_path
# we want the B.phras.* files in fixtures
env = {'phash_id': 'B', 'file_name': 'ignore'}
settings = {}
stream = cached_phrases(doc_content_stream, env, settings)
doc = next(stream)
assert 'water_stress_conditions' in doc.text
assert 'positive_development' in doc.text
评论列表
文章目录