Skip to content

Commit b83a0aa

Browse files
authored
skip recursion limit test on free-threaded CPython builds (#679)
For some reason, it seems that the recursion limit cannot be avoided in free-threaded CPython on GitHub Actions, so I will skip the test.
1 parent 9de2fd9 commit b83a0aa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/test_limits.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env python
2+
import sysconfig
3+
24
import pytest
35

46
from msgpack import (
@@ -153,6 +155,11 @@ def test_auto_max_array_len():
153155
unpacker.unpack()
154156

155157

158+
# Skip on free-threaded CPython builds because this test depends on recursion behavior.
159+
IS_FREE_THREADED_BUILD = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
160+
161+
162+
@pytest.mark.skipif(IS_FREE_THREADED_BUILD, reason="Skipped on free-threaded build")
156163
def test_nest_limit_1024():
157164
import sys
158165

0 commit comments

Comments
 (0)