mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 10:19:26 +02:00
test: Use pathlib over os.path #28362
revert netutil chgs py3.8 compliant fixes based on PR review
This commit is contained in:
@ -6,7 +6,6 @@
|
||||
|
||||
import json
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.test_node import ErrorMatch
|
||||
@ -21,8 +20,8 @@ class SettingsTest(BitcoinTestFramework):
|
||||
|
||||
def run_test(self):
|
||||
node, = self.nodes
|
||||
settings = Path(node.chain_path, "settings.json")
|
||||
conf = Path(node.datadir, "bitcoin.conf")
|
||||
settings = node.chain_path / "settings.json"
|
||||
conf = node.datadir_path / "bitcoin.conf"
|
||||
|
||||
# Assert empty settings file was created
|
||||
self.stop_node(0)
|
||||
@ -79,7 +78,7 @@ class SettingsTest(BitcoinTestFramework):
|
||||
self.stop_node(0)
|
||||
|
||||
# Test alternate settings path
|
||||
altsettings = Path(node.datadir, "altsettings.json")
|
||||
altsettings = node.datadir_path / "altsettings.json"
|
||||
with altsettings.open("w") as fp:
|
||||
fp.write('{"key": "value"}')
|
||||
with node.assert_debug_log(expected_msgs=['Setting file arg: key = "value"']):
|
||||
|
Reference in New Issue
Block a user