Skip to content

Commit

Permalink
Add check to catch wrong types in json
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikuoja committed Jan 28, 2025
1 parent ff20488 commit fc8f4e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions database/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,9 @@ def assert_lists_equal(
elif isinstance(item1, list):
assert_lists_equal(item1, item2, ignore_keys=ignore_keys, path=current_path)
else:
assert item1 == item2, f"Items differ at {current_path}"
assert (
type(item1) is type(item2) and item1 == item2
), f"Items differ at {current_path}"


def assert_dicts_equal(
Expand Down Expand Up @@ -2301,4 +2303,6 @@ def assert_dicts_equal(
dict2[key], value, ignore_keys=ignore_keys, path=current_path
)
else:
assert dict2[key] == value, f"Items differ at {current_path}"
assert (
type(dict2[key]) is type(value) and dict2[key] == value
), f"Items differ at {current_path}"

0 comments on commit fc8f4e6

Please sign in to comment.