Skip to content

Commit

Permalink
Clarify comment and move it into the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
DRMacIver committed Jul 19, 2020
1 parent 8a4851e commit 30b9314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hypothesis-python/tests/quality/test_shrinking_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ def iter_values(strategy, unique_by=lambda s: s):

while True:
for s in learner.dfa.all_matching_strings():
# We learned this badly. Relearn this particular
# string and restart the loop.
if not learner.member(s):
# This string matched the DFA but didn't
# satisfy the membership test. We relearn
# the string, improving our learner, and
# restart the loop.
learner.learn(s)
break
result = ConjectureData.for_buffer(s).draw(strategy)
Expand Down

0 comments on commit 30b9314

Please sign in to comment.