mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
test: use f-strings in feature_blocksdir.py
This commit is contained in:
parent
5453e87062
commit
dca173cc04
1 changed files with 2 additions and 2 deletions
|
@ -24,10 +24,10 @@ class BlocksdirTest(BitcoinTestFramework):
|
||||||
initialize_datadir(self.options.tmpdir, 0, self.chain)
|
initialize_datadir(self.options.tmpdir, 0, self.chain)
|
||||||
self.log.info("Starting with nonexistent blocksdir ...")
|
self.log.info("Starting with nonexistent blocksdir ...")
|
||||||
blocksdir_path = os.path.join(self.options.tmpdir, 'blocksdir')
|
blocksdir_path = os.path.join(self.options.tmpdir, 'blocksdir')
|
||||||
self.nodes[0].assert_start_raises_init_error(["-blocksdir=" + blocksdir_path], 'Error: Specified blocks directory "{}" does not exist.'.format(blocksdir_path))
|
self.nodes[0].assert_start_raises_init_error([f"-blocksdir={blocksdir_path}"], f'Error: Specified blocks directory "{blocksdir_path}" does not exist.')
|
||||||
os.mkdir(blocksdir_path)
|
os.mkdir(blocksdir_path)
|
||||||
self.log.info("Starting with existing blocksdir ...")
|
self.log.info("Starting with existing blocksdir ...")
|
||||||
self.start_node(0, ["-blocksdir=" + blocksdir_path])
|
self.start_node(0, [f"-blocksdir={blocksdir_path}"])
|
||||||
self.log.info("mining blocks..")
|
self.log.info("mining blocks..")
|
||||||
self.nodes[0].generatetoaddress(10, self.nodes[0].get_deterministic_priv_key().address)
|
self.nodes[0].generatetoaddress(10, self.nodes[0].get_deterministic_priv_key().address)
|
||||||
assert os.path.isfile(os.path.join(blocksdir_path, self.chain, "blocks", "blk00000.dat"))
|
assert os.path.isfile(os.path.join(blocksdir_path, self.chain, "blocks", "blk00000.dat"))
|
||||||
|
|
Loading…
Reference in a new issue