55from pathlib import Path
66from tempfile import TemporaryDirectory
77
8+ import pytest
9+
810from ethereum_spec_tools .forks import Hardfork
911from 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