1
0

tests: move /electrum/tests to /tests

This commit is contained in:
Sander van Grieken
2024-02-16 15:33:34 +01:00
parent e11d7b37f2
commit 73fee69f5c
103 changed files with 5 additions and 5 deletions

20
tests/test_coinchooser.py Normal file
View File

@@ -0,0 +1,20 @@
from electrum.coinchooser import CoinChooserPrivacy
from electrum.util import NotEnoughFunds
from . import ElectrumTestCase
class TestCoinChooser(ElectrumTestCase):
def test_bucket_candidates_with_empty_buckets(self):
def sufficient_funds(buckets, *, bucket_value_sum):
return True
coin_chooser = CoinChooserPrivacy(enable_output_value_rounding=False)
self.assertEqual([[]], coin_chooser.bucket_candidates_any([], sufficient_funds))
self.assertEqual([[]], coin_chooser.bucket_candidates_prefer_confirmed([], sufficient_funds))
def sufficient_funds(buckets, *, bucket_value_sum):
return False
with self.assertRaises(NotEnoughFunds):
coin_chooser.bucket_candidates_any([], sufficient_funds)
with self.assertRaises(NotEnoughFunds):
coin_chooser.bucket_candidates_prefer_confirmed([], sufficient_funds)