From d11e69193b9c3f35af177357008a0c50bbe43112 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sat, 18 Jul 2026 12:46:53 +0800 Subject: [PATCH] fix(test-specs): parenthesize walrus when counting failing txs Without parentheses, `:=` binds after `>`, so failing_tx_count became a bool and the multi-failure check never fired. --- packages/testing/src/execution_testing/specs/blockchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index a7ab9a9ecd..acb24f1def 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -848,7 +848,7 @@ def generate_block_data( ] txs = [tx.with_signature_and_sender() for tx in txs] - if failing_tx_count := len([tx for tx in txs if tx.error]) > 0: + if (failing_tx_count := len([tx for tx in txs if tx.error])) > 0: if failing_tx_count > 1: raise Exception( "test correctness: only one transaction can produce "