Skip to content

Commit

Permalink
(fix) imported samples not found
Browse files Browse the repository at this point in the history
  • Loading branch information
MementoRC committed Jan 23, 2024
1 parent c9b9551 commit 67a979b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
8 changes: 7 additions & 1 deletion tests/test_bench.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import os
import sys

from coincurve import PrivateKey, PublicKey, verify_signature
from tests.samples import MESSAGE, PRIVATE_KEY_BYTES, PUBLIC_KEY_COMPRESSED, SIGNATURE

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from tests.samples import MESSAGE, PRIVATE_KEY_BYTES, PUBLIC_KEY_COMPRESSED, SIGNATURE # noqa: E402


def test_verify_signature_util(benchmark):
Expand Down
8 changes: 7 additions & 1 deletion tests/test_ecdsa.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import os
import sys

from coincurve.ecdsa import cdata_to_der, der_to_cdata
from tests.samples import SIGNATURE

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from tests.samples import SIGNATURE # noqa: E402


def test_der():
Expand Down
8 changes: 7 additions & 1 deletion tests/test_keys.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os
import sys
from hashlib import sha512
from os import urandom

Expand All @@ -6,7 +8,11 @@
from coincurve.ecdsa import deserialize_recoverable, recover
from coincurve.keys import PrivateKey, PublicKey, PublicKeyXOnly
from coincurve.utils import bytes_to_int, int_to_bytes_padded, verify_signature
from tests.samples import (

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))


from tests.samples import ( # noqa: E402
MESSAGE,
PRIVATE_KEY_BYTES,
PRIVATE_KEY_DER,
Expand Down
13 changes: 12 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os
import sys
from os import urandom

import pytest
Expand All @@ -16,7 +18,16 @@
validate_secret,
verify_signature,
)
from tests.samples import MESSAGE, PRIVATE_KEY_DER, PUBLIC_KEY_COMPRESSED, PUBLIC_KEY_UNCOMPRESSED, SIGNATURE

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from tests.samples import ( # noqa: E402
MESSAGE,
PRIVATE_KEY_DER,
PUBLIC_KEY_COMPRESSED,
PUBLIC_KEY_UNCOMPRESSED,
SIGNATURE,
)


class TestPadScalar:
Expand Down

0 comments on commit 67a979b

Please sign in to comment.