File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
test/functional/test_framework Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2
2
# Copyright (c) 2019-2022 The Bitcoin Core developers
3
3
# Distributed under the MIT software license, see the accompanying
4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+ import pathlib
5
6
6
7
from test_framework .test_framework import BitcoinTestFramework
7
8
9
+
8
10
class TestShell :
9
11
"""Wrapper Class for BitcoinTestFramework.
10
12
@@ -67,7 +69,13 @@ def __new__(cls):
67
69
# This implementation enforces singleton pattern, and will return the
68
70
# previously initialized instance if available
69
71
if not TestShell .instance :
70
- TestShell .instance = TestShell .__TestShell ()
72
+ # BitcoinTestFramework instances are supposed to be constructed with the path
73
+ # of the calling test in order to find shared data like configuration and the
74
+ # cache. Since TestShell is meant for interactive use, there is no concrete
75
+ # test; passing a dummy name is fine though, as only the containing directory
76
+ # is relevant for successful initialization.
77
+ tests_directory = pathlib .Path (__file__ ).resolve ().parent .parent
78
+ TestShell .instance = TestShell .__TestShell (tests_directory / "testshell_dummy.py" )
71
79
TestShell .instance .running = False
72
80
return TestShell .instance
73
81
You can’t perform that action at this time.
0 commit comments