test: Use pathlib over os.path #28362

revert netutil chgs py3.8 compliant

fixes based on PR review
This commit is contained in:
ns-xvrn
2023-09-02 01:09:43 -04:00
parent 04265ba937
commit bfa0bd632a
22 changed files with 138 additions and 168 deletions

View File

@@ -3,8 +3,6 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_raises_rpc_error
@@ -31,13 +29,13 @@ class WalletCrossChain(BitcoinTestFramework):
def run_test(self):
self.log.info("Creating wallets")
node0_wallet = os.path.join(self.nodes[0].datadir, 'node0_wallet')
node0_wallet_backup = os.path.join(self.nodes[0].datadir, 'node0_wallet.bak')
node0_wallet = self.nodes[0].datadir_path / 'node0_wallet'
node0_wallet_backup = self.nodes[0].datadir_path / 'node0_wallet.bak'
self.nodes[0].createwallet(node0_wallet)
self.nodes[0].backupwallet(node0_wallet_backup)
self.nodes[0].unloadwallet(node0_wallet)
node1_wallet = os.path.join(self.nodes[1].datadir, 'node1_wallet')
node1_wallet_backup = os.path.join(self.nodes[0].datadir, 'node1_wallet.bak')
node1_wallet = self.nodes[1].datadir_path / 'node1_wallet'
node1_wallet_backup = self.nodes[0].datadir_path / 'node1_wallet.bak'
self.nodes[1].createwallet(node1_wallet)
self.nodes[1].backupwallet(node1_wallet_backup)
self.nodes[1].unloadwallet(node1_wallet)