From b237414910de2faf979b127f006ddde116277d73 Mon Sep 17 00:00:00 2001 From: fradamt Date: Fri, 3 May 2024 09:43:12 +0200 Subject: [PATCH] add .copy() where needed in tests --- .../test_process_execution_layer_withdrawal_request.py | 2 +- .../epoch_processing/test_process_pending_balance_deposits.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_withdrawal_request.py b/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_withdrawal_request.py index 4e540b41f..554fc53bd 100644 --- a/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_withdrawal_request.py +++ b/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_execution_layer_withdrawal_request.py @@ -774,7 +774,7 @@ def run_execution_layer_withdrawal_request_processing( pre_pending_partial_withdrawals = state.pending_partial_withdrawals.copy() pre_balance = state.balances[validator_index] pre_effective_balance = state.validators[validator_index].effective_balance - pre_state = state + pre_state = state.copy() expected_amount_to_withdraw = compute_amount_to_withdraw( spec, state, validator_index, execution_layer_withdrawal_request.amount ) diff --git a/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_balance_deposits.py b/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_balance_deposits.py index 42783d31e..981851bc8 100644 --- a/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_balance_deposits.py +++ b/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_balance_deposits.py @@ -95,7 +95,7 @@ def test_multiple_pending_deposits_below_churn(spec, state): state.pending_balance_deposits.append( spec.PendingBalanceDeposit(index=1, amount=amount) ) - pre_balances = state.balances + pre_balances = state.balances.copy() yield from run_epoch_processing_with( spec, state, "process_pending_balance_deposits" ) @@ -115,7 +115,7 @@ def test_multiple_pending_deposits_above_churn(spec, state): state.pending_balance_deposits.append( spec.PendingBalanceDeposit(index=i, amount=amount) ) - pre_balances = state.balances + pre_balances = state.balances.copy() yield from run_epoch_processing_with( spec, state, "process_pending_balance_deposits" )