mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 11:32:50 +02:00
scripted-diff: test: Remove brackets after assert
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test) -END VERIFY SCRIPT-
This commit is contained in:
@@ -125,7 +125,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# 1. Chain a few transactions that don't opt-in.
|
||||
txid_1 = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1)
|
||||
assert(not is_opt_in(self.nodes[0], txid_1))
|
||||
assert not is_opt_in(self.nodes[0], txid_1)
|
||||
assert_array_result(self.nodes[0].listtransactions(), {"txid": txid_1}, {"bip125-replaceable": "no"})
|
||||
sync_mempools(self.nodes)
|
||||
assert_array_result(self.nodes[1].listtransactions(), {"txid": txid_1}, {"bip125-replaceable": "no"})
|
||||
@@ -145,7 +145,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
txid_2 = self.nodes[1].sendrawtransaction(tx2_signed)
|
||||
|
||||
# ...and check the result
|
||||
assert(not is_opt_in(self.nodes[1], txid_2))
|
||||
assert not is_opt_in(self.nodes[1], txid_2)
|
||||
assert_array_result(self.nodes[1].listtransactions(), {"txid": txid_2}, {"bip125-replaceable": "no"})
|
||||
sync_mempools(self.nodes)
|
||||
assert_array_result(self.nodes[0].listtransactions(), {"txid": txid_2}, {"bip125-replaceable": "no"})
|
||||
@@ -161,7 +161,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
tx3_signed = self.nodes[0].signrawtransactionwithwallet(tx3)['hex']
|
||||
txid_3 = self.nodes[0].sendrawtransaction(tx3_signed)
|
||||
|
||||
assert(is_opt_in(self.nodes[0], txid_3))
|
||||
assert is_opt_in(self.nodes[0], txid_3)
|
||||
assert_array_result(self.nodes[0].listtransactions(), {"txid": txid_3}, {"bip125-replaceable": "yes"})
|
||||
sync_mempools(self.nodes)
|
||||
assert_array_result(self.nodes[1].listtransactions(), {"txid": txid_3}, {"bip125-replaceable": "yes"})
|
||||
@@ -175,7 +175,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
tx4_signed = self.nodes[1].signrawtransactionwithwallet(tx4)["hex"]
|
||||
txid_4 = self.nodes[1].sendrawtransaction(tx4_signed)
|
||||
|
||||
assert(not is_opt_in(self.nodes[1], txid_4))
|
||||
assert not is_opt_in(self.nodes[1], txid_4)
|
||||
assert_array_result(self.nodes[1].listtransactions(), {"txid": txid_4}, {"bip125-replaceable": "yes"})
|
||||
sync_mempools(self.nodes)
|
||||
assert_array_result(self.nodes[0].listtransactions(), {"txid": txid_4}, {"bip125-replaceable": "yes"})
|
||||
@@ -186,7 +186,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
tx3_b = tx3_b.serialize().hex()
|
||||
tx3_b_signed = self.nodes[0].signrawtransactionwithwallet(tx3_b)['hex']
|
||||
txid_3b = self.nodes[0].sendrawtransaction(tx3_b_signed, True)
|
||||
assert(is_opt_in(self.nodes[0], txid_3b))
|
||||
assert is_opt_in(self.nodes[0], txid_3b)
|
||||
|
||||
assert_array_result(self.nodes[0].listtransactions(), {"txid": txid_4}, {"bip125-replaceable": "unknown"})
|
||||
sync_mempools(self.nodes)
|
||||
@@ -202,7 +202,7 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# After mining a transaction, it's no longer BIP125-replaceable
|
||||
self.nodes[0].generate(1)
|
||||
assert(txid_3b not in self.nodes[0].getrawmempool())
|
||||
assert txid_3b not in self.nodes[0].getrawmempool()
|
||||
assert_equal(self.nodes[0].gettransaction(txid_3b)["bip125-replaceable"], "no")
|
||||
assert_equal(self.nodes[0].gettransaction(txid_4)["bip125-replaceable"], "unknown")
|
||||
|
||||
|
Reference in New Issue
Block a user