Skip to content

Commit 8e1a260

Browse files
refactor(tests): Improve fixture and test descriptions for clarity
1 parent 83b0af6 commit 8e1a260

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/osaka/eip7883_modexp_gas_increase/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414

1515
@pytest.fixture
1616
def gas_old() -> int | None:
17-
"""Gas value from the test vector if any."""
17+
"""Get old gas cost from the test vector if any."""
1818
return None
1919

2020

2121
@pytest.fixture
2222
def gas_new() -> int | None:
23-
"""Gas value from the test vector if any."""
23+
"""Get new gas cost from the test vector if any."""
2424
return None
2525

2626

2727
@pytest.fixture
2828
def call_opcode() -> Op:
29-
"""Return default call used to call the precompile."""
29+
"""Return call operationused to call the precompile."""
3030
return Op.CALL
3131

3232

@@ -59,7 +59,7 @@ def gas_measure_contract(
5959
call_contract_post_storage: Storage,
6060
call_succeeds: bool,
6161
) -> Address:
62-
"""Deploys a contract that measures ModExp gas consumption."""
62+
"""Deploys a contract that measures ModExp gas consumption and execution result."""
6363
assert call_opcode in [Op.CALL, Op.CALLCODE, Op.DELEGATECALL, Op.STATICCALL]
6464
value = [0] if call_opcode in [Op.CALL, Op.CALLCODE] else []
6565

tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_modexp_invalid(
106106
tx: Transaction,
107107
post: Dict,
108108
):
109-
"""Test ModExp gas cost using the test vectors from EIP-7883."""
109+
"""Test ModExp gas cost with invalid inputs."""
110110
state_test(
111111
pre=pre,
112112
tx=tx,
@@ -182,7 +182,7 @@ def test_modexp_gas_usage(
182182
tx: Transaction,
183183
post: Dict,
184184
):
185-
"""Test ModExp gas cost using the test vectors from EIP-7883."""
185+
"""Test ModExp gas cost with different precompile gas modifiers."""
186186
state_test(pre=pre, tx=tx, post=post)
187187

188188

@@ -219,7 +219,7 @@ def test_modexp_entry_points(
219219
modexp_input: bytes,
220220
tx_gas_limit: int,
221221
):
222-
"""Test ModExp entry points."""
222+
"""Test ModExp entry points with different precompile gas modifiers."""
223223
tx = Transaction(
224224
to=Spec.MODEXP_ADDRESS,
225225
sender=pre.fund_eoa(),

0 commit comments

Comments
 (0)