refactor: E275 missing whitespace after keyword

This commit is contained in:
tecnovert
2022-07-31 20:01:49 +02:00
parent 1601a57aed
commit 1c4f208d27
29 changed files with 295 additions and 295 deletions

View File

@@ -56,7 +56,7 @@ class Test(BaseTest):
'type_to': 'blind',
}
json_rv = json.loads(post_json_req('http://127.0.0.1:1800/json/wallets/part/withdraw', post_json))
assert(len(json_rv['txid']) == 64)
assert (len(json_rv['txid']) == 64)
logging.info('Waiting for blind balance')
wait_for_balance(test_delay_event, 'http://127.0.0.1:1800/json/wallets/part', 'blind_balance', 100.0 + node0_blind_before)
@@ -74,7 +74,7 @@ class Test(BaseTest):
swap_clients = self.swap_clients
js_0 = read_json_api(1800, 'wallets/part')
assert(float(js_0['blind_balance']) > 10.0)
assert (float(js_0['blind_balance']) > 10.0)
node0_blind_before = js_0['blind_balance'] + js_0['blind_unconfirmed']
js_1 = read_json_api(1801, 'wallets/part')
@@ -102,11 +102,11 @@ class Test(BaseTest):
amount_from = float(format_amount(amt_swap, 8))
js_1 = read_json_api(1801, 'wallets/part')
node1_blind_after = js_1['blind_balance'] + js_1['blind_unconfirmed']
assert(node1_blind_after > node1_blind_before + (amount_from - 0.05))
assert (node1_blind_after > node1_blind_before + (amount_from - 0.05))
js_0 = read_json_api(1800, 'wallets/part')
node0_blind_after = js_0['blind_balance'] + js_0['blind_unconfirmed']
assert(node0_blind_after < node0_blind_before - amount_from)
assert (node0_blind_after < node0_blind_before - amount_from)
js_0_xmr_after = read_json_api(1800, 'wallets/xmr')
js_1_xmr_after = read_json_api(1801, 'wallets/xmr')
@@ -116,7 +116,7 @@ class Test(BaseTest):
amount_to_float = float(format_amount(amount_to, 12))
node1_xmr_after = float(js_1_xmr_after['unconfirmed']) + float(js_1_xmr_after['balance'])
node1_xmr_before = float(js_1_xmr['unconfirmed']) + float(js_1_xmr['balance'])
assert(node1_xmr_after > node1_xmr_before + (amount_to_float - 0.02))
assert (node1_xmr_after > node1_xmr_before + (amount_to_float - 0.02))
def test_02_leader_recover_a_lock_tx(self):
logging.info('---------- Test PARTct to XMR leader recovers coin a lock tx')
@@ -138,7 +138,7 @@ class Test(BaseTest):
wait_for_bid(test_delay_event, swap_clients[0], bid_id, BidStates.BID_RECEIVED)
bid, xmr_swap = swap_clients[0].getXmrBid(bid_id)
assert(xmr_swap)
assert (xmr_swap)
swap_clients[1].setBidDebugInd(bid_id, DebugTypes.BID_STOP_AFTER_COIN_A_LOCK)
@@ -149,7 +149,7 @@ class Test(BaseTest):
js_w0_after = read_json_api(1800, 'wallets')
node0_blind_after = self.getBalance(js_w0_after)
assert(node0_blind_before - node0_blind_after < 0.02)
assert (node0_blind_before - node0_blind_after < 0.02)
def test_03_follower_recover_a_lock_tx(self):
logging.info('---------- Test PARTct to XMR follower recovers coin a lock tx')
@@ -171,7 +171,7 @@ class Test(BaseTest):
wait_for_bid(test_delay_event, swap_clients[0], bid_id, BidStates.BID_RECEIVED)
bid, xmr_swap = swap_clients[0].getXmrBid(bid_id)
assert(xmr_swap)
assert (xmr_swap)
swap_clients[1].setBidDebugInd(bid_id, DebugTypes.CREATE_INVALID_COIN_B_LOCK)
swap_clients[0].setBidDebugInd(bid_id, DebugTypes.BID_DONT_SPEND_COIN_A_LOCK_REFUND)
@@ -186,7 +186,7 @@ class Test(BaseTest):
node1_blind_before = self.getBalance(js_w1_before)
node1_blind_after = self.getBalance(js_w1_after)
amount_from = float(format_amount(amt_swap, 8))
assert(node1_blind_after - node1_blind_before > (amount_from - 0.02))
assert (node1_blind_after - node1_blind_before > (amount_from - 0.02))
swap_clients[0].abandonBid(bid_id)
swap_clients[1].abandonBid(bid_id)
@@ -204,7 +204,7 @@ class Test(BaseTest):
'remote_key': offerer_key
}).encode()
redeemed_txid = json.loads(urlopen('http://127.0.0.1:1801/json/bids/{}'.format(bid_id.hex()), data=data).read())['txid']
assert(len(redeemed_txid) == 64)
assert (len(redeemed_txid) == 64)
def test_04_follower_recover_b_lock_tx(self):
logging.info('---------- Test PARTct to XMR follower recovers coin b lock tx')
@@ -227,7 +227,7 @@ class Test(BaseTest):
wait_for_bid(test_delay_event, swap_clients[0], bid_id, BidStates.BID_RECEIVED)
bid, xmr_swap = swap_clients[0].getXmrBid(bid_id)
assert(xmr_swap)
assert (xmr_swap)
swap_clients[1].setBidDebugInd(bid_id, DebugTypes.CREATE_INVALID_COIN_B_LOCK)
@@ -241,11 +241,11 @@ class Test(BaseTest):
node0_blind_before = self.getBalance(js_w0_before)
node0_blind_after = self.getBalance(js_w0_after)
assert(node0_blind_before - node0_blind_after < 0.02)
assert (node0_blind_before - node0_blind_after < 0.02)
node1_xmr_before = self.getXmrBalance(js_w1_before)
node1_xmr_after = self.getXmrBalance(js_w1_after)
assert(node1_xmr_before - node1_xmr_after < 0.02)
assert (node1_xmr_before - node1_xmr_after < 0.02)
if __name__ == '__main__':