Skip to content

Commit

Permalink
test: check keys are in the same order in assert_equal_data (#1668)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli authored Dec 28, 2024
1 parent 4a9c8c7 commit 30d0249
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 65 deletions.
65 changes: 0 additions & 65 deletions tests/hypothesis/concat_test.py

This file was deleted.

4 changes: 4 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def assert_equal_data(result: Any, expected: dict[str, Any]) -> None:
sort_key = next(iter(expected.keys()))
expected = _sort_dict_by_key(expected, sort_key)
result = _sort_dict_by_key(result, sort_key)
assert list(result.keys()) == list(
expected.keys()
), f"Result keys {result.keys()}, expected keys: {expected.keys()}"

for key, expected_value in expected.items():
result_value = result[key]
for i, (lhs, rhs) in enumerate(zip_strict(result_value, expected_value)):
Expand Down

0 comments on commit 30d0249

Please sign in to comment.