This repository was archived by the owner on May 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 2
2
import json
3
3
import ethereum .processblock as pb
4
4
import ethereum .utils as utils
5
+ import ethereum .testutils as testutils
5
6
import ethereum .bloom as bloom
6
7
import os
7
8
from rlp .utils import decode_hex , encode_hex , str_to_bytes
@@ -20,8 +21,8 @@ def vm_tests_fixtures():
20
21
"""
21
22
# FIXME: assert that repo is uptodate
22
23
# cd fixtures; git pull origin develop; cd ..; git commit fixtures
23
- filenames = os .listdir (os .path .join ('fixtures' , 'VMTests' ))
24
- files = [os .path .join ('fixtures' , 'VMTests' , f ) for f in filenames ]
24
+ filenames = os .listdir (os .path .join (testutils . fixture_path , 'VMTests' ))
25
+ files = [os .path .join (testutils . fixture_path , 'VMTests' , f ) for f in filenames ]
25
26
vm_fixtures = {}
26
27
try :
27
28
for f , fn in zip (files , filenames ):
Original file line number Diff line number Diff line change
1
+ import os
1
2
import pytest
2
3
import json
3
4
import ethereum .blocks as blocks
5
+ import ethereum .testutils as testutils
4
6
from rlp .utils import encode_hex
5
- from tests .utils import new_db
7
+ from ethereum . tests .utils import new_db
6
8
from ethereum .slogging import get_logger , configure_logging
7
9
logger = get_logger ()
8
10
configure_logging (':trace' )
@@ -14,7 +16,8 @@ def genesis_fixture():
14
16
Read genesis block from fixtures.
15
17
"""
16
18
genesis_fixture = None
17
- with open ('fixtures/BasicTests/genesishashestest.json' , 'r' ) as f :
19
+ fn = os .path .join (testutils .fixture_path , 'BasicTests' , 'genesishashestest.json' )
20
+ with open (fn , 'r' ) as f :
18
21
genesis_fixture = json .load (f )
19
22
assert genesis_fixture is not None , "Could not read genesishashtest.json from fixtures. Make sure you did 'git submodule init'!"
20
23
# FIXME: assert that link is uptodate
Original file line number Diff line number Diff line change
1
+ import os
1
2
import json
2
3
import ethereum .trie as trie
3
- from tests .utils import new_db
4
+ from ethereum .tests .utils import new_db
5
+ import ethereum .testutils as testutils
4
6
from ethereum .slogging import get_logger , configure_logging
5
7
logger = get_logger ()
6
8
@@ -16,7 +18,9 @@ def check_testdata(data_keys, expected_keys):
16
18
17
19
def load_tests ():
18
20
try :
19
- fixture = json .load (open ('fixtures/TrieTests/trietestnextprev.json' , 'r' ))
21
+ fn = os .path .join (testutils .fixture_path , 'TrieTests' , 'trietestnextprev.json' )
22
+
23
+ fixture = json .load (open (fn , 'r' ))
20
24
except IOError :
21
25
raise IOError ("Could not read trietests.json from fixtures" ,
22
26
"Make sure you did 'git submodule init'" )
You can’t perform that action at this time.
0 commit comments