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

@@ -14,7 +14,6 @@ disconnected.
"""
from decimal import Decimal
import os
import shutil
from test_framework.test_framework import BitcoinTestFramework
@@ -88,8 +87,8 @@ class ReorgsRestoreTest(BitcoinTestFramework):
# Node0 wallet file is loaded on longest sync'ed node1
self.stop_node(1)
self.nodes[0].backupwallet(os.path.join(self.nodes[0].datadir, 'wallet.bak'))
shutil.copyfile(os.path.join(self.nodes[0].datadir, 'wallet.bak'), os.path.join(self.nodes[1].chain_path, self.default_wallet_name, self.wallet_data_filename))
self.nodes[0].backupwallet(self.nodes[0].datadir_path / 'wallet.bak')
shutil.copyfile(self.nodes[0].datadir_path / 'wallet.bak', self.nodes[1].chain_path / self.default_wallet_name / self.wallet_data_filename)
self.start_node(1)
tx_after_reorg = self.nodes[1].gettransaction(txid)
# Check that normal confirmed tx is confirmed again but with different blockhash