mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 01:09:14 +01:00
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
This commit is contained in:
@@ -104,7 +104,7 @@ class MaxUploadTest(BitcoinTestFramework):
|
||||
assert_equal(len(self.nodes[0].getpeerinfo()), 3)
|
||||
# At most a couple more tries should succeed (depending on how long
|
||||
# the test has been running so far).
|
||||
for i in range(3):
|
||||
for _ in range(3):
|
||||
p2p_conns[0].send_message(getdata_request)
|
||||
p2p_conns[0].wait_for_disconnect()
|
||||
assert_equal(len(self.nodes[0].getpeerinfo()), 2)
|
||||
|
||||
Reference in New Issue
Block a user