Skip to content

Commit b86b9fc

Browse files
committed
chore(execute): when fork is none check.
1 parent 0ee7d71 commit b86b9fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
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

0 commit comments

Comments
 (0)