Skip to content

Commit 41a5637

Browse files
committed
fix(test-fill): organize alloc groups by pytest param (enginex)
1 parent 5a0edda commit 41a5637

1 file changed

Lines changed: 32 additions & 6 deletions

File tree

tests/tangerine_whistle/eip150_operation_gas_costs/test_eip150_selfdestruct.py

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,6 @@ def test_selfdestruct_state_access_boundary(
565565
"is_success", [True, False], ids=["exact_gas", "exact_gas_minus_1"]
566566
)
567567
@pytest.mark.with_all_precompiles
568-
@pytest.mark.pre_alloc_group("precompile_funding")
569568
@pytest.mark.parametrize(
570569
"same_tx", [False, True], ids=["pre_deploy", "same_tx"]
571570
)
@@ -576,8 +575,22 @@ def test_selfdestruct_state_access_boundary(
576575
)
577576
@pytest.mark.parametrize(
578577
"beneficiary_initial_balance",
579-
[0, 1],
580-
ids=["dead_beneficiary", "alive_beneficiary"],
578+
[
579+
pytest.param(
580+
0,
581+
id="dead_beneficiary",
582+
marks=pytest.mark.pre_alloc_group(
583+
"eip150_selfdestruct_precompile_dead"
584+
),
585+
),
586+
pytest.param(
587+
1,
588+
id="alive_beneficiary",
589+
marks=pytest.mark.pre_alloc_group(
590+
"eip150_selfdestruct_precompile_alive"
591+
),
592+
),
593+
],
581594
)
582595
@pytest.mark.valid_from("TangerineWhistle")
583596
def test_selfdestruct_to_precompile(
@@ -673,7 +686,6 @@ def test_selfdestruct_to_precompile(
673686
"is_success", [True, False], ids=["exact_gas", "exact_gas_minus_1"]
674687
)
675688
@pytest.mark.with_all_precompiles
676-
@pytest.mark.pre_alloc_group("precompile_funding")
677689
@pytest.mark.parametrize(
678690
"same_tx", [False, True], ids=["pre_deploy", "same_tx"]
679691
)
@@ -684,8 +696,22 @@ def test_selfdestruct_to_precompile(
684696
)
685697
@pytest.mark.parametrize(
686698
"beneficiary_initial_balance",
687-
[0, 1],
688-
ids=["dead_beneficiary", "alive_beneficiary"],
699+
[
700+
pytest.param(
701+
0,
702+
id="dead_beneficiary",
703+
marks=pytest.mark.pre_alloc_group(
704+
"eip150_selfdestruct_precompile_boundary_dead"
705+
),
706+
),
707+
pytest.param(
708+
1,
709+
id="alive_beneficiary",
710+
marks=pytest.mark.pre_alloc_group(
711+
"eip150_selfdestruct_precompile_boundary_alive"
712+
),
713+
),
714+
],
689715
)
690716
@pytest.mark.valid_from("TangerineWhistle")
691717
def test_selfdestruct_to_precompile_state_access_boundary(

0 commit comments

Comments
 (0)