1
0

tests: fix DeprecationWarnings for py3.14: asyncio.iscoroutinefunction

same as https://github.com/spesmilo/electrum/pull/10197
This commit is contained in:
SomberNight
2025-10-09 15:43:54 +00:00
parent 2dc9ca906b
commit dbacb503a4
2 changed files with 6 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ import base64
import json
import os
import sys
import inspect
import electrum_ecc as ecc
@@ -46,7 +47,7 @@ def needs_test_with_all_aes_implementations(func):
has_cryptodome = crypto.HAS_CRYPTODOME
has_cryptography = crypto.HAS_CRYPTOGRAPHY
has_pyaes = crypto.HAS_PYAES
if asyncio.iscoroutinefunction(func):
if inspect.iscoroutinefunction(func):
async def run_test(*args, **kwargs):
try:
if has_pyaes:
@@ -92,7 +93,7 @@ def needs_test_with_all_chacha20_implementations(func):
return func
has_cryptodome = crypto.HAS_CRYPTODOME
has_cryptography = crypto.HAS_CRYPTOGRAPHY
if asyncio.iscoroutinefunction(func):
if inspect.iscoroutinefunction(func):
async def run_test(*args, **kwargs):
try:
if has_cryptodome:
@@ -128,7 +129,7 @@ def disable_ecdsa_r_value_grinding(func):
tests running in parallel would break things
"""
is_grinding = ecc.ENABLE_ECDSA_R_VALUE_GRINDING
if asyncio.iscoroutinefunction(func):
if inspect.iscoroutinefunction(func):
async def run_test(*args, **kwargs):
try:
ecc.ENABLE_ECDSA_R_VALUE_GRINDING = False