mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Updates conftest fixtures so they do not autorun
The modules that need to run either bitcoind or the api do now reference to the fixture in the first test that needs it. Since the fixtures are definexd session-wise the rest of the modules will have access to them from that point on.
This commit is contained in:
@@ -9,10 +9,10 @@ from test.simulator.bitcoind_sim import run_simulator
|
||||
bitcoind_process = Process(target=run_simulator)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope='session')
|
||||
@pytest.fixture(scope='session')
|
||||
def run_bitcoind():
|
||||
global bitcoind_process
|
||||
|
||||
|
||||
bitcoind_process.daemon = True
|
||||
bitcoind_process.start()
|
||||
|
||||
@@ -20,7 +20,7 @@ def run_bitcoind():
|
||||
sleep(0.1)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope='session')
|
||||
@pytest.fixture(scope='session')
|
||||
def run_api():
|
||||
api_thread = Thread(target=start_api)
|
||||
api_thread.daemon = True
|
||||
|
||||
Reference in New Issue
Block a user