Another pass: rough shape of tree and tests

It isn't working yet, the tests don't pass.

But it is on the way!
This commit is contained in:
Luke Murphy
2019-08-01 13:06:32 +02:00
parent c89cafe022
commit 45e24073d2
4 changed files with 154 additions and 25 deletions

22
test/conftest.py Normal file
View File

@ -0,0 +1,22 @@
import hashlib
import pytest
@pytest.fixture
def leaf():
def _leaf(node):
return hashlib.sha256(leaf.data).hexdigest()
return _leaf
@pytest.fixture
def parent():
def _parent(left, right):
sha256 = hashlib.sha256()
sha256.update(left)
sha256.update(right)
return sha256.hexdigest()
return _parent