From c27dd25d2e181ff166b1fd61461a6c908a636930 Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Sun, 24 Aug 2025 01:57:56 -0400 Subject: [PATCH] test_coinmoves.py: use pytest.approx for change amount Change amount can vary slightly. Exact comparisons cause test flakiness. Changelog-None --- tests/test_coinmoves.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_coinmoves.py b/tests/test_coinmoves.py index 0cdefe83fc73..8aa972065310 100644 --- a/tests/test_coinmoves.py +++ b/tests/test_coinmoves.py @@ -738,10 +738,10 @@ def test_coinmoves_unilateral_htlc_timeout(node_factory, bitcoind): 'utxo': f"{fundchannel['txid']}:{fundchannel['outnum'] ^ 1}"}, {'account_id': 'wallet', # change from anchor spend 'blockheight': 104, - 'credit_msat': 15579000, + 'credit_msat': pytest.approx(15579000, abs=7000), 'debit_msat': 0, 'extra_tags': [], - 'output_msat': 15579000, + 'output_msat': pytest.approx(15579000, abs=7000), 'primary_tag': 'deposit', 'utxo': f"{anchor_spend_txid}:0"}, {'account_id': fundchannel['channel_id'],