Skip to content

Commit

Permalink
Test: Printing failed cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Oct 10, 2023
1 parent 7b1e170 commit 051f0a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/test_fuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def get_random_string(

def is_equal_strings(native_strings, big_strings):
for native_slice, big_slice in zip(native_strings, big_strings):
assert native_slice == big_slice
assert (
native_slice == big_slice
), f"Mismatch between `{native_slice}` and `{str(big_slice)}`"


def check_identical(
Expand All @@ -47,7 +49,9 @@ def check_identical(
if check_iterators:
for i in range(len(native_strings)):
assert len(native_strings[i]) == len(big_strings[i])
assert native_strings[i] == big_strings[i]
assert (
native_strings[i] == big_strings[i]
), f"Mismatch between `{native_strings[i]}` and `{str(big_strings[i])}`"
assert [c for c in native_strings[i]] == [c for c in big_strings[i]]

is_equal_strings(native_strings, big_strings)
Expand Down

0 comments on commit 051f0a8

Please sign in to comment.