Merge pull request #10265 from SomberNight/202510_ci_py314
ci: add task to also run unit tests with new python 3.14
This commit is contained in:
@@ -17,9 +17,11 @@ task:
|
|||||||
ELECTRUM_PYTHON_VERSION: 3.12
|
ELECTRUM_PYTHON_VERSION: 3.12
|
||||||
- env:
|
- env:
|
||||||
ELECTRUM_PYTHON_VERSION: 3.13
|
ELECTRUM_PYTHON_VERSION: 3.13
|
||||||
- name: "unittests: py3.13, debug-mode"
|
- env:
|
||||||
|
ELECTRUM_PYTHON_VERSION: 3.14
|
||||||
|
- name: "unittests: py3.14, debug-mode"
|
||||||
env:
|
env:
|
||||||
ELECTRUM_PYTHON_VERSION: 3.13
|
ELECTRUM_PYTHON_VERSION: 3.14
|
||||||
# enable additional checks:
|
# enable additional checks:
|
||||||
PYTHONASYNCIODEBUG: "1"
|
PYTHONASYNCIODEBUG: "1"
|
||||||
PYTHONDEVMODE: "1"
|
PYTHONDEVMODE: "1"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import threading
|
|||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
import functools
|
import functools
|
||||||
|
import inspect
|
||||||
|
|
||||||
import electrum
|
import electrum
|
||||||
import electrum.logging
|
import electrum.logging
|
||||||
@@ -88,7 +89,7 @@ def as_testnet(func):
|
|||||||
NOTE: this is inherently sequential; tests running in parallel would break things
|
NOTE: this is inherently sequential; tests running in parallel would break things
|
||||||
"""
|
"""
|
||||||
old_net = constants.net
|
old_net = constants.net
|
||||||
if asyncio.iscoroutinefunction(func):
|
if inspect.iscoroutinefunction(func):
|
||||||
async def run_test(*args, **kwargs):
|
async def run_test(*args, **kwargs):
|
||||||
try:
|
try:
|
||||||
constants.BitcoinTestnet.set_as_network()
|
constants.BitcoinTestnet.set_as_network()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import base64
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import inspect
|
||||||
|
|
||||||
import electrum_ecc as ecc
|
import electrum_ecc as ecc
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ def needs_test_with_all_aes_implementations(func):
|
|||||||
has_cryptodome = crypto.HAS_CRYPTODOME
|
has_cryptodome = crypto.HAS_CRYPTODOME
|
||||||
has_cryptography = crypto.HAS_CRYPTOGRAPHY
|
has_cryptography = crypto.HAS_CRYPTOGRAPHY
|
||||||
has_pyaes = crypto.HAS_PYAES
|
has_pyaes = crypto.HAS_PYAES
|
||||||
if asyncio.iscoroutinefunction(func):
|
if inspect.iscoroutinefunction(func):
|
||||||
async def run_test(*args, **kwargs):
|
async def run_test(*args, **kwargs):
|
||||||
try:
|
try:
|
||||||
if has_pyaes:
|
if has_pyaes:
|
||||||
@@ -92,7 +93,7 @@ def needs_test_with_all_chacha20_implementations(func):
|
|||||||
return func
|
return func
|
||||||
has_cryptodome = crypto.HAS_CRYPTODOME
|
has_cryptodome = crypto.HAS_CRYPTODOME
|
||||||
has_cryptography = crypto.HAS_CRYPTOGRAPHY
|
has_cryptography = crypto.HAS_CRYPTOGRAPHY
|
||||||
if asyncio.iscoroutinefunction(func):
|
if inspect.iscoroutinefunction(func):
|
||||||
async def run_test(*args, **kwargs):
|
async def run_test(*args, **kwargs):
|
||||||
try:
|
try:
|
||||||
if has_cryptodome:
|
if has_cryptodome:
|
||||||
@@ -128,7 +129,7 @@ def disable_ecdsa_r_value_grinding(func):
|
|||||||
tests running in parallel would break things
|
tests running in parallel would break things
|
||||||
"""
|
"""
|
||||||
is_grinding = ecc.ENABLE_ECDSA_R_VALUE_GRINDING
|
is_grinding = ecc.ENABLE_ECDSA_R_VALUE_GRINDING
|
||||||
if asyncio.iscoroutinefunction(func):
|
if inspect.iscoroutinefunction(func):
|
||||||
async def run_test(*args, **kwargs):
|
async def run_test(*args, **kwargs):
|
||||||
try:
|
try:
|
||||||
ecc.ENABLE_ECDSA_R_VALUE_GRINDING = False
|
ecc.ENABLE_ECDSA_R_VALUE_GRINDING = False
|
||||||
|
|||||||
Reference in New Issue
Block a user