From 35237b7c51a1cfc9a852b64cb3a80e8028d79a1d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 21 Oct 2024 11:07:07 -0400 Subject: [PATCH] fixup --- tests/test_merkle_set.py | 2 +- tests/test_sized_bytes.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_merkle_set.py b/tests/test_merkle_set.py index 595abd98..3f42d58c 100644 --- a/tests/test_merkle_set.py +++ b/tests/test_merkle_set.py @@ -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) diff --git a/tests/test_sized_bytes.py b/tests/test_sized_bytes.py index a7b8aef1..ec357600 100644 --- a/tests/test_sized_bytes.py +++ b/tests/test_sized_bytes.py @@ -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):