Skip to content

Commit e02e7da

Browse files
authored
chore(ci|tests|fill): fixes for release ci when filling with --generate-all-formats (#2275)
* chore(ci|tests|fill): fixes for releases. * chore: lint 79 line lenght. * chore(execute): when fork is none check.
1 parent 4ba770d commit e02e7da

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

src/pytest_plugins/execute/pre_alloc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,12 @@ def pre(
548548
request: pytest.FixtureRequest,
549549
) -> Generator[Alloc, None, None]:
550550
"""Return default pre allocation for all tests (Empty alloc)."""
551+
# FIXME: Static tests dont have a fork so we need to get it from the node.
552+
actual_fork = fork
553+
if actual_fork is None:
554+
assert hasattr(request.node, "fork")
555+
actual_fork = request.node.fork
556+
551557
# Record the starting balance of the sender
552558
sender_test_starting_balance = eth_rpc.get_balance(sender_key)
553559

src/pytest_plugins/filler/pre_alloc.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,13 +434,20 @@ def pre(
434434
contract_address_iterator: Iterator[Address],
435435
eoa_iterator: Iterator[EOA],
436436
evm_code_type: EVMCodeType,
437-
fork: Fork,
437+
fork: Fork | None,
438+
request: pytest.FixtureRequest,
438439
) -> Alloc:
439440
"""Return default pre allocation for all tests (Empty alloc)."""
441+
# FIXME: Static tests dont have a fork so we need to get it from the node.
442+
actual_fork = fork
443+
if actual_fork is None:
444+
assert hasattr(request.node, "fork")
445+
actual_fork = request.node.fork
446+
440447
return Alloc(
441448
alloc_mode=alloc_mode,
442449
contract_address_iterator=contract_address_iterator,
443450
eoa_iterator=eoa_iterator,
444-
fork=fork,
451+
fork=actual_fork,
445452
evm_code_type=evm_code_type,
446453
)

tests/prague/eip6110_deposits/test_deposits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
signature=0x03,
319319
index=i,
320320
)
321-
for i in range(500)
321+
for i in range(450)
322322
],
323323
tx_gas_limit=16_777_216,
324324
),
@@ -490,7 +490,7 @@
490490
index=i,
491491
valid=False,
492492
)
493-
for i in range(500)
493+
for i in range(450)
494494
],
495495
tx_gas_limit=10_000_000,
496496
),

0 commit comments

Comments
 (0)