Skip to content

Commit

Permalink
Test improvements from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspider committed Dec 10, 2024
1 parent 57e5d93 commit ecd07db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
9 changes: 3 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
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
from pathlib import Path
absolute_path = Path(__file__).absolute().parent # noqa: E402
sys.path.append(str(absolute_path / "bitcoin_client")) # noqa: E402

from ragger_bitcoin import createRaggerClient, RaggerClient
from ragger.backend import RaisePolicy
Expand All @@ -15,7 +13,6 @@
import ledger_bitcoin._base58 as base58
from ledger_bitcoin.common import sha256
from ledger_bitcoin import Chain
from pathlib import Path
from decimal import Decimal
from time import sleep
import subprocess
Expand Down
12 changes: 2 additions & 10 deletions tests_perf/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@
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
absolute_path = Path(__file__).absolute().parent.parent # noqa: E402
sys.path.append(str(absolute_path / "bitcoin_client")) # noqa: E402

random.seed(0) # make sure tests are repeatable

0 comments on commit ecd07db

Please sign in to comment.