Browse Source

follow-up fix tests: logic typo

follow-up https://github.com/spesmilo/electrum/pull/7202

defaultdict[int] is a type!

```
>>> from collections import defaultdict
>>> d = defaultdict[int]
>>> d[2]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: There are no type variables left in collections.defaultdict[int]
```

Also, prior to py3.9, it is a TypeError.
patch-4
SomberNight 3 years ago
parent
commit
7354feeffe
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/tests/test_lnpeer.py

2
electrum/tests/test_lnpeer.py

@ -205,7 +205,7 @@ class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]):
min_cltv_expiry=decoded_invoice.get_min_final_cltv_expiry(),
r_tags=decoded_invoice.get_routing_info('r'),
invoice_features=decoded_invoice.get_features(),
trampoline_fee_levels=defaultdict[int],
trampoline_fee_levels=defaultdict(int),
use_two_trampolines=False,
payment_hash=decoded_invoice.paymenthash,
payment_secret=decoded_invoice.payment_secret,

Loading…
Cancel
Save