Skip to content

Commit e4bb577

Browse files
committed
feat(spec-tests): split e2e fork tool test including hard-coded osaka
1 parent 4f36896 commit e4bb577

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/json_infra/test_tools_new_fork.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@
55
from pathlib import Path
66
from tempfile import TemporaryDirectory
77

8+
import pytest
9+
810
from ethereum_spec_tools.forks import Hardfork
911
from ethereum_spec_tools.new_fork.cli import main as new_fork
1012

1113

12-
def test_end_to_end() -> None:
14+
@pytest.mark.parametrize(
15+
"template_fork",
16+
[
17+
Hardfork.discover()[-1].short_name,
18+
"osaka",
19+
],
20+
ids=lambda tf: f"{tf}",
21+
)
22+
def test_end_to_end(template_fork: str) -> None:
1323
"""
1424
Test that the ethereum-spec-new-fork CLI tool creates a fork from a
1525
template, correctly modifying names, blob parameters, and imports.
@@ -18,10 +28,6 @@ def test_end_to_end() -> None:
1828
output_dir = Path(base_dir) / "ethereum"
1929
fork_dir = output_dir / "e2e_fork"
2030

21-
# Get the latest fork dynamically to avoid breaking with new forks
22-
forks = Hardfork.discover()
23-
template_fork = forks[-1].short_name
24-
2531
new_fork(
2632
[
2733
"--new-fork",
@@ -52,7 +58,7 @@ def test_end_to_end() -> None:
5258

5359
assert "FORK_CRITERIA = ByTimestamp(7)" in source
5460
assert "E2E Fork" in source
55-
assert template_fork.title() not in source
61+
assert template_fork.capitalize() not in source
5662

5763
with (fork_dir / "vm" / "gas.py").open("r") as f:
5864
source = f.read()

0 commit comments

Comments
 (0)