22
22
from cli .gen_index import generate_fixtures_index
23
23
from config import AppConfig
24
24
from ethereum_clis import TransitionTool
25
- from ethereum_clis .clis .eels_t8n import EELST8NWrapper
26
25
from ethereum_clis .clis .geth import FixtureConsumerTool
27
26
from ethereum_test_base_types import Account , Address , Alloc , ReferenceSpec
28
27
from ethereum_test_fixtures import (
@@ -118,19 +117,12 @@ def default_html_report_file_path() -> str:
118
117
def pytest_addoption (parser : pytest .Parser ):
119
118
"""Add command-line options to pytest."""
120
119
evm_group = parser .getgroup ("evm" , "Arguments defining evm executable behavior" )
121
- evm_group .addoption (
122
- "--eels" ,
123
- action = "store_true" ,
124
- dest = "eels" ,
125
- default = False ,
126
- help = "Use eels t8n entry point" ,
127
- )
128
120
evm_group .addoption (
129
121
"--evm-bin" ,
130
122
action = "store" ,
131
123
dest = "evm_bin" ,
132
124
type = Path ,
133
- default = "ethereum-spec-evm-resolver" ,
125
+ default = None ,
134
126
help = (
135
127
"Path to an evm executable (or name of an executable in the PATH) that provides `t8n`."
136
128
" Default: `ethereum-spec-evm-resolver`."
@@ -353,11 +345,13 @@ def pytest_configure(config):
353
345
354
346
# Instantiate the transition tool here to check that the binary path/trace option is valid.
355
347
# This ensures we only raise an error once, if appropriate, instead of for every test.
356
- if config .getoption ("eels" , False ):
357
- t8n = EELST8NWrapper .default (trace = config .getoption ("evm_collect_traces" ))
348
+ evm_bin = config .getoption ("evm_bin" )
349
+ if evm_bin is None :
350
+ assert TransitionTool .default_tool is not None , "No default transition tool found"
351
+ t8n = TransitionTool .default_tool (trace = config .getoption ("evm_collect_traces" ))
358
352
else :
359
353
t8n = TransitionTool .from_binary_path (
360
- binary_path = config . getoption ( " evm_bin" ) , trace = config .getoption ("evm_collect_traces" )
354
+ binary_path = evm_bin , trace = config .getoption ("evm_collect_traces" )
361
355
)
362
356
if (
363
357
isinstance (config .getoption ("numprocesses" ), int )
@@ -549,7 +543,7 @@ def pytest_html_report_title(report):
549
543
550
544
551
545
@pytest .fixture (autouse = True , scope = "session" )
552
- def evm_bin (request : pytest .FixtureRequest ) -> Path :
546
+ def evm_bin (request : pytest .FixtureRequest ) -> Path | None :
553
547
"""Return configured evm tool binary path used to run t8n."""
554
548
return request .config .getoption ("evm_bin" )
555
549
@@ -564,10 +558,13 @@ def verify_fixtures_bin(request: pytest.FixtureRequest) -> Path | None:
564
558
565
559
566
560
@pytest .fixture (autouse = True , scope = "session" )
567
- def t8n (request : pytest .FixtureRequest , evm_bin : Path ) -> Generator [TransitionTool , None , None ]:
561
+ def t8n (
562
+ request : pytest .FixtureRequest , evm_bin : Path | None
563
+ ) -> Generator [TransitionTool , None , None ]:
568
564
"""Return configured transition tool."""
569
- if request .config .getoption ("eels" ):
570
- t8n = EELST8NWrapper .default (trace = request .config .getoption ("evm_collect_traces" ))
565
+ if evm_bin is None :
566
+ assert TransitionTool .default_tool is not None , "No default transition tool found"
567
+ t8n = TransitionTool .default_tool (trace = request .config .getoption ("evm_collect_traces" ))
571
568
else :
572
569
t8n = TransitionTool .from_binary_path (
573
570
binary_path = evm_bin , trace = request .config .getoption ("evm_collect_traces" )
@@ -604,7 +601,7 @@ def do_fixture_verification(
604
601
def evm_fixture_verification (
605
602
request : pytest .FixtureRequest ,
606
603
do_fixture_verification : bool ,
607
- evm_bin : Path ,
604
+ evm_bin : Path | None ,
608
605
verify_fixtures_bin : Path | None ,
609
606
) -> Generator [FixtureConsumer | None , None , None ]:
610
607
"""
0 commit comments