Skip to content

Commit b832ffe

Browse files
tdb3theStack
authored andcommitted
refactor: introduce default pid file name constant in tests
1 parent 33adc75 commit b832ffe

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

test/functional/feature_filelock.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import string
88

99
from test_framework.test_framework import BitcoinTestFramework
10-
from test_framework.test_node import ErrorMatch
10+
from test_framework.test_node import (
11+
BITCOIN_PID_FILENAME_DEFAULT,
12+
ErrorMatch,
13+
)
1114

1215
class FilelockTest(BitcoinTestFramework):
1316
def add_options(self, parser):
@@ -33,7 +36,7 @@ def run_test(self):
3336
self.log.info("Check that cookie and PID file are not deleted when attempting to start a second bitcoind using the same datadir")
3437
cookie_file = datadir / ".cookie"
3538
assert cookie_file.exists() # should not be deleted during the second bitcoind instance shutdown
36-
pid_file = datadir / "bitcoind.pid"
39+
pid_file = datadir / BITCOIN_PID_FILENAME_DEFAULT
3740
assert pid_file.exists()
3841

3942
if self.is_wallet_compiled():

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
NUM_XOR_BYTES = 8
4949
# The null blocks key (all 0s)
5050
NULL_BLK_XOR_KEY = bytes([0] * NUM_XOR_BYTES)
51+
BITCOIN_PID_FILENAME_DEFAULT = "bitcoind.pid"
5152

5253

5354
class FailedToStartError(Exception):

0 commit comments

Comments
 (0)