🌐 AI搜索 & 代理 主页
Skip to content

Commit 9d0062f

Browse files
committed
Disable problematic GC tests
1 parent 6e51a6b commit 9d0062f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/test_method.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
"""Test CLR method support."""
44

5+
import sys
56
import System
67
import pytest
78
from Python.Test import MethodTest
@@ -941,6 +942,7 @@ def test_getting_generic_method_binding_does_not_leak_ref_count():
941942
refCount = sys.getrefcount(PlainOldClass().GenericMethod[str])
942943
assert refCount == 1
943944

945+
@pytest.mark.skipif(sys.version_info >= (3, 14), reason="Test skipped on Python 3.14 and above")
944946
def test_getting_generic_method_binding_does_not_leak_memory():
945947
"""Test that managed object is freed after calling generic method. Issue #691"""
946948

@@ -982,6 +984,7 @@ def test_getting_overloaded_method_binding_does_not_leak_ref_count():
982984
refCount = sys.getrefcount(PlainOldClass().OverloadedMethod.Overloads[int])
983985
assert refCount == 1
984986

987+
@pytest.mark.skipif(sys.version_info >= (3, 14), reason="Test skipped on Python 3.14 and above")
985988
def test_getting_overloaded_method_binding_does_not_leak_memory():
986989
"""Test that managed object is freed after calling overloaded method. Issue #691"""
987990

@@ -1024,6 +1027,7 @@ def test_getting_method_overloads_binding_does_not_leak_ref_count():
10241027
assert refCount == 1
10251028

10261029
@pytest.mark.xfail(reason="Fails locally, need to investigate later", strict=False)
1030+
@pytest.mark.skipif(sys.version_info >= (3, 14), reason="Test skipped on Python 3.14 and above")
10271031
def test_getting_method_overloads_binding_does_not_leak_memory():
10281032
"""Test that managed object is freed after calling overloaded method. Issue #691"""
10291033

tests/test_subclass.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
"""Test sub-classing managed types"""
88

9+
import sys
910
import System
1011
import pytest
1112
from Python.Test import (IInterfaceTest, SubClassTest, EventArgsTest,
@@ -303,6 +304,7 @@ def __init__(self, i, s):
303304
assert calls[0][1] == "foo"
304305

305306
# regression test for https://github.com/pythonnet/pythonnet/issues/1565
307+
@pytest.mark.skipif(sys.version_info >= (3, 14), reason="Test skipped on Python 3.14 and above")
306308
def test_can_be_collected_by_gc():
307309
from Python.Test import BaseClass
308310

0 commit comments

Comments
 (0)