Skip to content

Commit 961f581

Browse files
committed
test: use f-strings in feature_notifications.py
1 parent 1a546e6 commit 961f581

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/feature_notifications.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
UNCONFIRMED_HASH_STRING = 'unconfirmed'
2121

2222
def notify_outputname(walletname, txid):
23-
return txid if os.name == 'nt' else '{}_{}'.format(walletname, txid)
23+
return txid if os.name == 'nt' else f'{walletname}_{txid}'
2424

2525

2626
class NotificationsTest(BitcoinTestFramework):
@@ -39,11 +39,11 @@ def setup_network(self):
3939

4040
# -alertnotify and -blocknotify on node0, walletnotify on node1
4141
self.extra_args = [[
42-
"-alertnotify=echo > {}".format(os.path.join(self.alertnotify_dir, '%s')),
43-
"-blocknotify=echo > {}".format(os.path.join(self.blocknotify_dir, '%s')),
42+
f"-alertnotify=echo > {os.path.join(self.alertnotify_dir, '%s')}",
43+
f"-blocknotify=echo > {os.path.join(self.blocknotify_dir, '%s')}",
4444
], [
4545
"-rescan",
46-
"-walletnotify=echo %h_%b > {}".format(os.path.join(self.walletnotify_dir, notify_outputname('%w', '%s'))),
46+
f"-walletnotify=echo %h_%b > {os.path.join(self.walletnotify_dir, notify_outputname('%w', '%s'))}",
4747
]]
4848
self.wallet_names = [self.default_wallet_name, self.wallet]
4949
super().setup_network()
@@ -54,12 +54,12 @@ def run_test(self):
5454
seed = "cTdGmKFWpbvpKQ7ejrdzqYT2hhjyb3GPHnLAK7wdi5Em67YLwSm9"
5555
xpriv = "tprv8ZgxMBicQKsPfHCsTwkiM1KT56RXbGGTqvc2hgqzycpwbHqqpcajQeMRZoBD35kW4RtyCemu6j34Ku5DEspmgjKdt2qe4SvRch5Kk8B8A2v"
5656
desc_imports = [{
57-
"desc": descsum_create("wpkh(" + xpriv + "/0/*)"),
57+
"desc": descsum_create(f"wpkh({xpriv}/0/*)"),
5858
"timestamp": 0,
5959
"active": True,
6060
"keypool": True,
6161
},{
62-
"desc": descsum_create("wpkh(" + xpriv + "/1/*)"),
62+
"desc": descsum_create(f"wpkh({xpriv}/1/*)"),
6363
"timestamp": 0,
6464
"active": True,
6565
"keypool": True,

0 commit comments

Comments
 (0)