Skip to content

Commit f1a3d35

Browse files
committed
temp: check the skip condition
1 parent fe75b2d commit f1a3d35

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: coverage/env.py

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
else:
4141
PYPYVERSION = (0,)
4242

43+
# Does this version of Python have a GIL?
44+
GIL = getattr(sys, '_is_gil_enabled', lambda: True)()
45+
4346
# Python behavior.
4447
class PYBEHAVIOR:
4548
"""Flags indicating this Python's behavior."""

Diff for: tests/test_oddball.py

+3
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ def once(x): # line 301
213213
@pytest.mark.skipif(not testenv.C_TRACER, reason="Only the C tracer has refcounting issues")
214214
# In fact, sysmon explicitly holds onto all code objects,
215215
# so this will definitely fail with sysmon.
216+
# 3.13t never reclaims code objects: https://github.com/python/cpython/pull/131989
217+
@pytest.mark.skipif(env.PYVERSION[:2] == (3, 13) and not env.GIL)
216218
@pytest.mark.parametrize("branch", [False, True])
217219
def test_eval_codeobject_leak(self, branch: bool) -> None:
218220
# https://github.com/nedbat/coveragepy/issues/1924
@@ -232,6 +234,7 @@ def test_eval_codeobject_leak(self, branch: bool) -> None:
232234
print(f"Mem delta: {(now - base)//1024}")
233235
base = now
234236
assert any(d < 50 * 1024 for d in deltas)
237+
1/0
235238

236239

237240
class MemoryFumblingTest(CoverageTest):

0 commit comments

Comments
 (0)