Skip to content

Commit fb63393

Browse files
committed
test: use f-strings in feature_loadblock.py
1 parent e9ca8b2 commit fb63393

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

test/functional/feature_loadblock.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ def run_test(self):
4545

4646
self.log.info("Create linearization config file")
4747
with open(cfg_file, "a", encoding="utf-8") as cfg:
48-
cfg.write("datadir={}\n".format(data_dir))
49-
cfg.write("rpcuser={}\n".format(node_url.username))
50-
cfg.write("rpcpassword={}\n".format(node_url.password))
51-
cfg.write("port={}\n".format(node_url.port))
52-
cfg.write("host={}\n".format(node_url.hostname))
53-
cfg.write("output_file={}\n".format(bootstrap_file))
54-
cfg.write("max_height=100\n")
55-
cfg.write("netmagic=fabfb5da\n")
56-
cfg.write("input={}\n".format(blocks_dir))
57-
cfg.write("genesis={}\n".format(genesis_block))
58-
cfg.write("hashlist={}\n".format(hash_list.name))
48+
cfg.write(f"datadir={data_dir}\n")
49+
cfg.write(f"rpcuser={node_url.username}\n")
50+
cfg.write(f"rpcpassword={node_url.password}\n")
51+
cfg.write(f"port={node_url.port}\n")
52+
cfg.write(f"host={node_url.hostname}\n")
53+
cfg.write(f"output_file={bootstrap_file}\n")
54+
cfg.write(f"max_height=100\n")
55+
cfg.write(f"netmagic=fabfb5da\n")
56+
cfg.write(f"input={blocks_dir}\n")
57+
cfg.write(f"genesis={genesis_block}\n")
58+
cfg.write(f"hashlist={hash_list.name}\n")
5959

6060
base_dir = self.config["environment"]["SRCDIR"]
6161
linearize_dir = os.path.join(base_dir, "contrib", "linearize")
@@ -72,7 +72,7 @@ def run_test(self):
7272
check=True)
7373

7474
self.log.info("Restart second, unsynced node with bootstrap file")
75-
self.restart_node(1, extra_args=["-loadblock=" + bootstrap_file])
75+
self.restart_node(1, extra_args=[f"-loadblock={bootstrap_file}"])
7676
assert_equal(self.nodes[1].getblockcount(), 100) # start_node is blocking on all block files being imported
7777

7878
assert_equal(self.nodes[1].getblockchaininfo()['blocks'], 100)

0 commit comments

Comments
 (0)