Skip to content

Commit 677035f

Browse files
authored
Merge pull request #15 from Merkleize/update_tests_path
Set PYTHONPATH directly from conftest.py
2 parents 838c569 + 8f325d6 commit 677035f

File tree

5 files changed

+4
-2
lines changed

5 files changed

+4
-2
lines changed

.github/workflows/run-tests.yml

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ jobs:
3636
pip install .
3737
- name: Create test wallet
3838
run: bash ./examples/init.sh
39-
- name: Add repository root to PYTHONPATH
40-
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
4139
- name: Run tests and capture output
4240
run: pytest -vv
4341
- name: Upload test output as artifact

tests/conftest.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import pytest
22

3+
import sys
34
import os
45
from pathlib import Path
56

67
from matt.btctools.auth_proxy import AuthServiceProxy
78
from matt.manager import ContractManager
89
from test_utils.utxograph import create_utxo_graph
910

11+
root_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../')
12+
sys.path.append(root_path)
13+
1014

1115
rpc_url = "http://%s:%s@%s:%s" % (
1216
os.getenv("BTC_RPC_USER", "rpcuser"),
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)