aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdb3 <106488469+tdb3@users.noreply.github.com>2024-08-25 08:41:21 -0400
committertdb3 <106488469+tdb3@users.noreply.github.com>2024-08-25 08:41:21 -0400
commitd43948c3ef610c383176bf9b389697973bd0ad64 (patch)
tree8696f9a128f2d07d29bc74b48a0e647504305a3c
parentc8176f758b5991c3797c32ee519d32c14b444991 (diff)
refactor: use unlink rather than os.remove
-rwxr-xr-xtest/functional/feature_blocksxor.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/feature_blocksxor.py b/test/functional/feature_blocksxor.py
index e9d89ede8f..16597e6d01 100755
--- a/test/functional/feature_blocksxor.py
+++ b/test/functional/feature_blocksxor.py
@@ -3,7 +3,6 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test support for XORed block data and undo files (`-blocksxor` option)."""
-import os
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_node import ErrorMatch
@@ -54,7 +53,7 @@ class BlocksXORTest(BitcoinTestFramework):
match=ErrorMatch.PARTIAL_REGEX)
self.log.info("Delete XOR key, restart node with '-blocksxor=0', check blk*.dat/rev*.dat file integrity")
- os.remove(node.blocks_key_path)
+ node.blocks_key_path.unlink()
self.start_node(0, extra_args=['-blocksxor=0'])
# checklevel=2 -> verify block validity + undo data
# nblocks=0 -> verify all blocks