Skip to content

Commit 0117604

Browse files
committed
misc: fix up test harness.
2 COMMITS SQUASHED: fixtures: include missing Constantinople in helpers. Debugging CREATE2 using the full "Blockchain" tests in `fixtures` (they are disabled in `py-evm`, because they're slow and a duplication of "State" tests). A few definitions are missing - so add them. tests/conftest: fix VM-tracing log-to-file helper. Also move `import`s out of the helper, so they're not encountered by the interpreter on every invocation of the helper.
1 parent 010b840 commit 0117604

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

eth/tools/fixtures/helpers.py

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
BaseVM,
4141
)
4242
from eth.vm.forks import (
43+
ConstantinopleVM,
4344
ByzantiumVM,
4445
TangerineWhistleVM,
4546
FrontierVM,
@@ -123,6 +124,10 @@ def chain_vm_configuration(fixture: Dict[str, Any]) -> Iterable[Tuple[int, Type[
123124
return (
124125
(0, ByzantiumVM),
125126
)
127+
elif network == 'Constantinople':
128+
return (
129+
(0, ConstantinopleVM),
130+
)
126131
elif network == 'FrontierToHomesteadAt5':
127132
HomesteadVM = BaseHomesteadVM.configure(support_dao_fork=False)
128133
return (

tests/conftest.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
# Uncomment this to have logs from tests written to a file. This is useful for
2424
# debugging when you need to dump the VM output from test runs.
2525
"""
26+
import datetime
27+
import logging
28+
import os
29+
from eth.tools.logging import TRACE_LEVEL_NUM
30+
2631
@pytest.yield_fixture(autouse=True)
2732
def _file_logging(request):
28-
import datetime
29-
import os
3033
3134
logger = logging.getLogger('eth')
3235

tests/json-fixtures/test_blockchain.py

-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ def fixture(fixture_data):
8484
fixture_key,
8585
normalize_blockchain_fixtures,
8686
)
87-
if fixture['network'] == 'Constantinople':
88-
pytest.skip('Constantinople VM rules not yet supported')
8987
return fixture
9088

9189

0 commit comments

Comments
 (0)