mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 01:09:14 +01:00
test: Allow pathlib.Path as RPC argument via authproxy
Also, add datadir_path property to TestNode
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user