diff --git a/.vscode/settings.json b/.vscode/settings.json index 093c26db7..a8c746db6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,8 @@ "C_Cpp.clang_format_path": "/usr/bin/clang-format", "editor.formatOnSave": true, "ledgerDevTools.appSettings": { - "selectedUseCase": "release" + "selectedUseCase": "release", + "selectedVariant": "bitcoin_testnet", + "selectedDevice": "Nano S" } } \ No newline at end of file diff --git a/bitcoin_client/tests/requirements.txt b/bitcoin_client/tests/requirements.txt index e7c7ab739..502511278 100644 --- a/bitcoin_client/tests/requirements.txt +++ b/bitcoin_client/tests/requirements.txt @@ -7,3 +7,4 @@ pytest>=6.1.1,<7.0.0 pytest-timeout>=2.1.0,<3.0.0 speculos>=0.12.0,<0.13.0 typing-extensions>=3.7,<4.0 +-e ../ diff --git a/tests/conftest.py b/tests/conftest.py index ab40a51e7..4b896b91d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,5 @@ -import sys # noqa: E402 -import os # noqa: E402 - -absolute_path = os.path.dirname(os.path.abspath(__file__)) # noqa: E402 -relative_bitcoin_path = ('../bitcoin_client') # noqa: E402 -absolute_bitcoin_client_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), '../') # noqa: E402 -sys.path.append(os.path.join(absolute_path, relative_bitcoin_path)) # noqa: E402 +import os from ragger_bitcoin import createRaggerClient, RaggerClient from ragger.backend import RaisePolicy diff --git a/tests/requirements.txt b/tests/requirements.txt index 9fa0510eb..390304519 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -7,4 +7,5 @@ embit>=0.7.0,<0.8.0 mnemonic==0.20 bip32>=3.4,<4.0 speculos>=0.12.0,<0.13.0 +-e ../bitcoin_client ragger[speculos, ledgerwallet]>=1.6.0 diff --git a/tests_mainnet/requirements.txt b/tests_mainnet/requirements.txt index e7c7ab739..08cfbf370 100644 --- a/tests_mainnet/requirements.txt +++ b/tests_mainnet/requirements.txt @@ -7,3 +7,4 @@ pytest>=6.1.1,<7.0.0 pytest-timeout>=2.1.0,<3.0.0 speculos>=0.12.0,<0.13.0 typing-extensions>=3.7,<4.0 +-e ../bitcoin_client diff --git a/tests_perf/conftest.py b/tests_perf/conftest.py index 577e6475c..32c78def0 100644 --- a/tests_perf/conftest.py +++ b/tests_perf/conftest.py @@ -2,16 +2,6 @@ from pathlib import Path from test_utils.fixtures import * import random -import sys -import os - -absolute_path = os.path.dirname(os.path.abspath(__file__)) -relative_bitcoin_path = ('../bitcoin_client') -absolute_bitcoin_client_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), '../') -sys.path.append(os.path.join(absolute_path, relative_bitcoin_path)) - -from ledger_bitcoin import Chain # noqa: E402 TESTS_ROOT_DIR = Path(__file__).parent diff --git a/tests_perf/requirements.txt b/tests_perf/requirements.txt index 4b2d380ac..24771981d 100644 --- a/tests_perf/requirements.txt +++ b/tests_perf/requirements.txt @@ -6,3 +6,4 @@ pytest>=8.2.2,<9.0.0 pytest-benchmark>=4.0.0,<5.0.0 speculos>=0.12.0,<0.13.0 typing-extensions>=3.7,<4.0 +-e ../bitcoin_client