def test_hypothesis_text(s, each_text_maker):
# have to get a fresh text maker EACH time function is invoked, due to Hypothesis quirk explained here:
# http://hypothesis.works/articles/hypothesis-pytest-fixtures/
text_maker = each_text_maker.clone()
_input_tokenized = text_maker.input_text(s)
sentences = text_maker.make_sentences(300)
word_set_comparison = helpers.WordSetComparison(generated_tokens=sentences, input_tokenized=_input_tokenized)
assert word_set_comparison.output_is_valid_strict()
评论列表
文章目录