def ecc_backend(): return NativeECCBackend()
def native_key_api(): return KeyAPI(backend=NativeECCBackend())
def key_api(cls): return KeyAPI(backend=NativeECCBackend())
import os import pytest from eth_keys import KeyAPI from eth_keys.backends import CoinCurveECCBackend from eth_keys.backends import NativeECCBackend from eth_utils import ( keccak, ) MSG = b'message' MSGHASH = keccak(MSG) backends = [ NativeECCBackend(), ] try: import coincurve backends.append(CoinCurveECCBackend()) except ImportError: if 'REQUIRE_COINCURVE' in os.environ: raise def backend_id_fn(backend): return type(backend).__name__ @pytest.fixture(params=backends, ids=backend_id_fn)
def native_backend(): return NativeECCBackend()