test: Allow pathlib.Path as RPC argument via authproxy

Also, add datadir_path property to TestNode
This commit is contained in:
MarcoFalke
2023-06-16 17:10:30 +02:00
parent fa41614a0a
commit dddd89962b
4 changed files with 13 additions and 10 deletions

View File

@@ -22,7 +22,10 @@ import shlex
import sys
from pathlib import Path
from .authproxy import JSONRPCException
from .authproxy import (
JSONRPCException,
EncodeDecimal,
)
from .descriptors import descsum_create
from .p2p import P2P_SUBVERSION
from .util import (
@@ -35,7 +38,6 @@ from .util import (
rpc_url,
wait_until_helper,
p2p_port,
EncodeDecimal,
)
BITCOIND_PROC_WAIT_TIMEOUT = 60
@@ -405,9 +407,13 @@ class TestNode():
with open(self.bitcoinconf, 'w', encoding='utf8') as conf:
conf.write(conf_data)
@property
def datadir_path(self) -> Path:
return Path(self.datadir)
@property
def chain_path(self) -> Path:
return Path(self.datadir) / self.chain
return self.datadir_path / self.chain
@property
def debug_log_path(self) -> Path: