aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_descriptor.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-08-03 01:10:56 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-08-06 18:39:33 +0200
commitdac7a111bdd3b0233d94cf68dae7a8bfc6ac9c64 (patch)
treec3ae6f8e52eade778dff7c9ad679a919db22778b /test/functional/wallet_descriptor.py
parent82127d27c9001eee3eb28df67ce2e6eace620423 (diff)
downloadbitcoin-dac7a111bdd3b0233d94cf68dae7a8bfc6ac9c64.tar.xz
refactor: test: use _ variable for unused loop counters
substitutes "for x in range(N):" by "for _ in range(N):" indicates to the reader that a block is just repeated N times, and that the loop counter is not used in the body
Diffstat (limited to 'test/functional/wallet_descriptor.py')
-rwxr-xr-xtest/functional/wallet_descriptor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/wallet_descriptor.py b/test/functional/wallet_descriptor.py
index 289ccf43ec..9c63e8f7d3 100755
--- a/test/functional/wallet_descriptor.py
+++ b/test/functional/wallet_descriptor.py
@@ -107,7 +107,7 @@ class WalletDescriptorTest(BitcoinTestFramework):
assert_equal(info2['desc'], info3['desc'])
self.log.info("Test that getnewaddress still works after keypool is exhausted in an encrypted wallet")
- for i in range(0, 500):
+ for _ in range(500):
send_wrpc.getnewaddress()
self.log.info("Test that unlock is needed when deriving only hardened keys in an encrypted wallet")
@@ -120,7 +120,7 @@ class WalletDescriptorTest(BitcoinTestFramework):
}])
send_wrpc.walletlock()
# Exhaust keypool of 100
- for i in range(0, 100):
+ for _ in range(100):
send_wrpc.getnewaddress(address_type='bech32')
# This should now error
assert_raises_rpc_error(-12, "Keypool ran out, please call keypoolrefill first", send_wrpc.getnewaddress, '', 'bech32')