Skip to content

fix: await ledger.melt() call in test_melt_quote_reuse_same_outputs#1080

Open
vicjuma wants to merge 1 commit into
cashubtc:mainfrom
vicjuma:fix/await-first-melt-in-output-reuse-test
Open

fix: await ledger.melt() call in test_melt_quote_reuse_same_outputs#1080
vicjuma wants to merge 1 commit into
cashubtc:mainfrom
vicjuma:fix/await-first-melt-in-output-reuse-test

Conversation

@vicjuma

@vicjuma vicjuma commented Jul 13, 2026

Copy link
Copy Markdown

Description: The melt() call was wrapped in a trailing-comma tuple, which created the coroutine but never awaited it. This led to a silent no-op, meaning the test wasn't actually exercising the output-reuse scenario it claims to test.

Fixes: coroutine 'Ledger.melt' was never awaited (RuntimeWarning)

Change:

@@ -253,7 +253,7 @@ async def test_melt_quote_reuse_same_outputs(wallet, ledger: Ledger):
     change_outputs, change_rs = wallet._construct_outputs(
         n_change_outputs * [1], change_secrets, change_rs
     )
-    (ledger.melt(proofs=proofs1, quote=melt_quote1.quote, outputs=change_outputs),)
+    await ledger.melt(proofs=proofs1, quote=melt_quote1.quote, outputs=change_outputs)

Testing:

pytest tests/mint/test_mint_melt.py::test_melt_quote_reuse_same_outputs

The melt() call was wrapped in a trailing-comma tuple, which created
the coroutine but never awaited it. This caused the first melt to be
a silent no-op, meaning the test wasn't actually exercising the
output-reuse scenario it claims to test.

Fixes: coroutine 'Ledger.melt' was never awaited (RuntimeWarning)
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.52%. Comparing base (a935eb9) to head (57070b5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
- Coverage   74.54%   74.52%   -0.02%     
==========================================
  Files         115      115              
  Lines       13195    13195              
==========================================
- Hits         9836     9834       -2     
- Misses       3359     3361       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant