From 30b9314d1f44e0b81158e4a1696e103ce1122d2f Mon Sep 17 00:00:00 2001 From: "David R. MacIver" Date: Sun, 19 Jul 2020 20:28:35 +0100 Subject: [PATCH] Clarify comment and move it into the loop --- hypothesis-python/tests/quality/test_shrinking_order.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hypothesis-python/tests/quality/test_shrinking_order.py b/hypothesis-python/tests/quality/test_shrinking_order.py index e7ce715c09..a151a4bd9b 100644 --- a/hypothesis-python/tests/quality/test_shrinking_order.py +++ b/hypothesis-python/tests/quality/test_shrinking_order.py @@ -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)