Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Oct 21, 2024
1 parent 5452a51 commit 35237b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_merkle_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def check_tree(leafs: List[bytes32]) -> None:
)

for i in range(256):
item = bytes32.fill(i.to_bytes(), fill=b"\x02", align="<")
item = bytes32.fill(bytes([i]), fill=b"\x02", align="<")
py_included, py_proof = py_tree.is_included_already_hashed(item)
assert not py_included
ru_included, ru_proof = ru_tree.is_included_already_hashed(item)
Expand Down
6 changes: 5 additions & 1 deletion tests/test_sized_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ def test_fill_not_multiple_raises() -> None:
with pytest.raises(ValueError):
bytes8.fill(b"\x00", fill=b"\x01\x01")


def test_align_left() -> None:
assert bytes8.fill(b"\x01", fill=b"\x02", align="<") == bytes8([1, 2, 2, 2, 2, 2, 2, 2])
assert bytes8.fill(b"\x01", fill=b"\x02", align="<") == bytes8(
[1, 2, 2, 2, 2, 2, 2, 2]
)


def test_invalid_alignment() -> None:
with pytest.raises(ValueError):
Expand Down

0 comments on commit 35237b7

Please sign in to comment.