Skip to content

Commit

Permalink
tests: include missing Constantinople tests.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
veox committed Dec 12, 2018
1 parent 14fe819 commit 3c3aa30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions eth/tools/fixtures/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
BaseVM,
)
from eth.vm.forks import (
ConstantinopleVM,
ByzantiumVM,
TangerineWhistleVM,
FrontierVM,
Expand Down Expand Up @@ -123,6 +124,10 @@ def chain_vm_configuration(fixture: Dict[str, Any]) -> Iterable[Tuple[int, Type[
return (
(0, ByzantiumVM),
)
elif network == 'Constantinople':
return (
(0, ConstantinopleVM),
)
elif network == 'FrontierToHomesteadAt5':
HomesteadVM = BaseHomesteadVM.configure(support_dao_fork=False)
return (
Expand Down
7 changes: 5 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
# Uncomment this to have logs from tests written to a file. This is useful for
# debugging when you need to dump the VM output from test runs.
"""
import datetime
import logging
import os
from eth.tools.logging import TRACE_LEVEL_NUM
@pytest.yield_fixture(autouse=True)
def _file_logging(request):
import datetime
import os
logger = logging.getLogger('eth')
Expand Down
2 changes: 0 additions & 2 deletions tests/json-fixtures/test_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ def fixture(fixture_data):
fixture_key,
normalize_blockchain_fixtures,
)
if fixture['network'] == 'Constantinople':
pytest.skip('Constantinople VM rules not yet supported')
return fixture


Expand Down

0 comments on commit 3c3aa30

Please sign in to comment.