Skip to content

Commit

Permalink
Fix intermittent coverage bug
Browse files Browse the repository at this point in the history
See nedbat/coveragepy#198. Although this line
is reached, the CPython interpreter does not execute it and so it is
incorrectly labeled as missed.
  • Loading branch information
berfr committed Jul 3, 2020
1 parent 8370464 commit df8db03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markovify/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def make_sentence(self, init_state=None, **kwargs):
for _ in range(tries):
words = prefix + self.chain.walk(init_state)
if (max_words != None and len(words) > max_words) or (min_words != None and len(words) < min_words):
continue
continue # pragma: no cover # see https://github.com/nedbat/coveragepy/issues/198
if test_output and hasattr(self, "rejoined_text"):
if self.test_sentence_output(words, mor, mot):
return self.word_join(words)
Expand Down

0 comments on commit df8db03

Please sign in to comment.