mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
refactor: E275 missing whitespace after keyword
This commit is contained in:
@@ -88,12 +88,12 @@ class Test(BaseTest):
|
||||
amount_from = float(format_amount(amt_swap, 8))
|
||||
js_1 = read_json_api(1801, 'wallets')
|
||||
node1_from_after = self.getBalance(js_1)
|
||||
assert(node1_from_after > node1_from_before + (amount_from - 0.05))
|
||||
assert (node1_from_after > node1_from_before + (amount_from - 0.05))
|
||||
|
||||
js_0 = read_json_api(1800, 'wallets')
|
||||
node0_from_after = self.getBalance(js_0)
|
||||
# TODO: Discard block rewards
|
||||
# assert(node0_from_after < node0_from_before - amount_from)
|
||||
# assert (node0_from_after < node0_from_before - amount_from)
|
||||
|
||||
js_0_xmr_after = read_json_api(1800, 'wallets/xmr')
|
||||
js_1_xmr_after = read_json_api(1801, 'wallets/xmr')
|
||||
@@ -103,7 +103,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 {} to XMR leader recovers coin a lock tx'.format(str(self.test_coin_from)))
|
||||
@@ -125,7 +125,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)
|
||||
|
||||
@@ -138,7 +138,7 @@ class Test(BaseTest):
|
||||
node0_from_after = self.getBalance(js_w0_after)
|
||||
|
||||
# TODO: Discard block rewards
|
||||
# assert(node0_from_before - node0_from_after < 0.02)
|
||||
# assert (node0_from_before - node0_from_after < 0.02)
|
||||
|
||||
def test_03_follower_recover_a_lock_tx(self):
|
||||
logging.info('---------- Test {} to XMR follower recovers coin a lock tx'.format(str(self.test_coin_from)))
|
||||
@@ -160,7 +160,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)
|
||||
swap_clients[0].setBidDebugInd(bid_id, DebugTypes.BID_DONT_SPEND_COIN_A_LOCK_REFUND)
|
||||
@@ -176,7 +176,7 @@ class Test(BaseTest):
|
||||
node1_from_after = self.getBalance(js_w1_after)
|
||||
amount_from = float(format_amount(amt_swap, 8))
|
||||
# TODO: Discard block rewards
|
||||
# assert(node1_from_after - node1_from_before > (amount_from - 0.02))
|
||||
# assert (node1_from_after - node1_from_before > (amount_from - 0.02))
|
||||
|
||||
swap_clients[0].abandonBid(bid_id)
|
||||
|
||||
@@ -204,7 +204,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].acceptXmrBid(bid_id)
|
||||
@@ -219,11 +219,11 @@ class Test(BaseTest):
|
||||
node0_from_after = self.getBalance(js_w0_after)
|
||||
|
||||
# TODO: Discard block rewards
|
||||
# assert(node0_from_before - node0_from_after < 0.02)
|
||||
# assert (node0_from_before - node0_from_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__':
|
||||
|
||||
Reference in New Issue
Block a user