test_phrases.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:eea.corpus 作者: eea 项目源码 文件源码
def test_cached_phrases_no_files(self,
                                     corpus_base_path,
                                     doc_content_stream):
        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': 'X', 'file_name': 'ignore'}
        settings = {}

        stream = cached_phrases(doc_content_stream, env, settings)
        with pytest.raises(StopIteration):
            next(stream)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号