Skip to content

Commit bed1b90

Browse files
committed
👷 stabilize PyPy CI tests
1 parent e0e5673 commit bed1b90

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/unit/thread_safety_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from qs_codec.models.key_path_node import KeyPathNode
1313
from qs_codec.models.weak_wrapper import WeakWrapper, _proxy_cache
1414

15-
IS_PYPY_38: bool = sys.implementation.name == "pypy" and sys.version_info[:2] == (3, 8)
15+
IS_PYPY: bool = sys.implementation.name == "pypy"
1616
THREAD_COUNT: int = 8
17-
ITERATION_COUNT: int = 100 if IS_PYPY_38 else 250
18-
HEAVY_ENCODE_ITERATION_COUNT: int = 25 if IS_PYPY_38 else ITERATION_COUNT
19-
JOIN_TIMEOUT_SECONDS: float = 60.0 if IS_PYPY_38 else 30.0
17+
ITERATION_COUNT: int = 100 if IS_PYPY else 250
18+
HEAVY_ENCODE_ITERATION_COUNT: int = 25 if IS_PYPY else ITERATION_COUNT
19+
JOIN_TIMEOUT_SECONDS: float = 60.0 if IS_PYPY else 30.0
2020

2121

2222
def _run_concurrently(

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ commands =
7676

7777
[testenv:pypy3.8]
7878
basepython = pypy3.8
79+
commands =
80+
# PyPy 7.3.11 can segfault during pytest assertion rewriting before tests run.
81+
pytest --assert=plain -v --cov=src/qs_codec --cov-report=xml
7982

8083
[testenv:pypy3.9]
8184
basepython = pypy3.9

0 commit comments

Comments
 (0)