Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 65ee002

Browse files
committed
Ensure test fixtures are in bytes format
1 parent 4c14bb5 commit 65ee002

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ethereum/tests/test_genesis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import json
44
import ethereum.blocks as blocks
55
import ethereum.testutils as testutils
6+
from ethereum.testutils import fixture_to_bytes
67
import ethereum.utils as utils
78
from rlp.utils import encode_hex
89
from ethereum.tests.utils import new_env
@@ -23,7 +24,7 @@ def genesis_fixture():
2324
# FIXME: assert that link is uptodate
2425
for k in ('genesis_rlp_hex', 'genesis_state_root', 'genesis_hash'):
2526
assert k in genesis_fixture
26-
return genesis_fixture
27+
return fixture_to_bytes(genesis_fixture)
2728

2829

2930
@pytest.mark.xfail # code not in sync with genesis fixtures

ethereum/tests/test_trie_next_prev.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import ethereum.trie as trie
44
from ethereum.utils import to_string
55
from ethereum.tests.utils import new_db
6+
from ethereum.testutils import fixture_to_bytes
67
import ethereum.testutils as testutils
78
from ethereum.slogging import get_logger
89
logger = get_logger()
@@ -30,7 +31,7 @@ def run_test(name):
3031

3132
logger.debug('testing %s' % name)
3233
t = trie.Trie(new_db())
33-
data = load_tests()[name]
34+
data = fixture_to_bytes(load_tests()[name])
3435

3536
for k in data['in']:
3637
logger.debug('updating with (%s, %s)' % (k, k))

0 commit comments

Comments
 (0)