Skip to content

Commit b237414

Browse files
committed
add .copy() where needed in tests
1 parent e0ee280 commit b237414

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_withdrawal_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def run_execution_layer_withdrawal_request_processing(
774774
pre_pending_partial_withdrawals = state.pending_partial_withdrawals.copy()
775775
pre_balance = state.balances[validator_index]
776776
pre_effective_balance = state.validators[validator_index].effective_balance
777-
pre_state = state
777+
pre_state = state.copy()
778778
expected_amount_to_withdraw = compute_amount_to_withdraw(
779779
spec, state, validator_index, execution_layer_withdrawal_request.amount
780780
)

tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_balance_deposits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_multiple_pending_deposits_below_churn(spec, state):
9595
state.pending_balance_deposits.append(
9696
spec.PendingBalanceDeposit(index=1, amount=amount)
9797
)
98-
pre_balances = state.balances
98+
pre_balances = state.balances.copy()
9999
yield from run_epoch_processing_with(
100100
spec, state, "process_pending_balance_deposits"
101101
)
@@ -115,7 +115,7 @@ def test_multiple_pending_deposits_above_churn(spec, state):
115115
state.pending_balance_deposits.append(
116116
spec.PendingBalanceDeposit(index=i, amount=amount)
117117
)
118-
pre_balances = state.balances
118+
pre_balances = state.balances.copy()
119119
yield from run_epoch_processing_with(
120120
spec, state, "process_pending_balance_deposits"
121121
)

0 commit comments

Comments
 (0)