Skip to content

Commit

Permalink
Refactor assertion messages in test_function.py for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Buba98 committed Dec 19, 2024
1 parent 99459ae commit fc35941
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
def f_finite(regexEnumerator: RegexEnumerator, possibilities: list[str]):
while len(possibilities) != 0:
res = regexEnumerator.next()
assert res in possibilities, f"Generated string '{
res}' is not in the possibilities."
assert res in possibilities, f"'{res}' is not in the possibilities."
possibilities.remove(res)

assert regexEnumerator.done
Expand All @@ -14,8 +13,7 @@ def f_finite(regexEnumerator: RegexEnumerator, possibilities: list[str]):
def f_infinite(regexEnumerator: RegexEnumerator, possibilities: list[str]):
while len(possibilities) != 0:
res = regexEnumerator.next()
assert res in possibilities, f"Generated string '{
res}' is not in the possibilities."
assert res in possibilities, f"'{res}' is not in the possibilities."
possibilities.remove(res)

assert not regexEnumerator.done

0 comments on commit fc35941

Please sign in to comment.