Skip to content

Commit

Permalink
format code with black
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanc414 authored and olivmath committed Dec 27, 2023
1 parent 266b5de commit c9538d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/errors/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def invalid_hash_function(data):


def test_empty_tree_root():
mtree = MerkleTree(['a', 'b', 'c', 'd'])
mtree = MerkleTree(["a", "b", "c", "d"])
mtree.leaves = []

with raises(ValueError) as error:
mtree.root

assert str(error.value) == 'Cannot get root of an empty tree'
assert str(error.value) == "Cannot get root of an empty tree"
5 changes: 2 additions & 3 deletions test/merkletreejs/test_merkle_proof_verify_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ def sha256(x, y):

proof_py = []
for node in data_js["proof"]:
side = Side.RIGHT if node['position'] == 'right' else Side.LEFT
data = bytes.fromhex(node['data'])
side = Side.RIGHT if node["position"] == "right" else Side.LEFT
data = bytes.fromhex(node["data"])
proof_py.append(Node(data=data, side=side))


leaves = ["a", "b", "c", "d", "e", "f", "g", "h"]
mtree = MerkleTree(leaves, sha256)
leaf = "a"
Expand Down

0 comments on commit c9538d6

Please sign in to comment.