From 55de249aa175bc7085114e8f5290641bf5595330 Mon Sep 17 00:00:00 2001 From: stepan Date: Wed, 3 Nov 2021 16:32:10 +0100 Subject: [PATCH] Skip the failing tests on debug CPython builds for now --- test/test_hpyfield.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/test_hpyfield.py b/test/test_hpyfield.py index ead4d25b2..e45881231 100644 --- a/test/test_hpyfield.py +++ b/test/test_hpyfield.py @@ -97,6 +97,10 @@ def test_gc_track(self): if not self.supports_refcounts(): import pytest pytest.skip("CPython only") + import sys + if hasattr(sys, 'gettotalrefcount'): + import pytest + pytest.skip("Test fails on debug build: https://github.com/hpyproject/hpy/issues/255") # Test that we correctly call PyObject_GC_Track on CPython. The # easiest way is to check whether the object is in # gc.get_objects(). @@ -132,6 +136,10 @@ def test_gc_track_no_gc_flag(self): assert not gc.is_tracked(p) def test_tp_traverse(self): + import sys + if hasattr(sys, 'gettotalrefcount'): + import pytest + pytest.skip("Test fails on debug build: https://github.com/hpyproject/hpy/issues/255") import gc mod = self.make_module(""" @DEFINE_PairObject @@ -239,6 +247,10 @@ def test_store_overwrite(self): assert sys.getrefcount(a) == a_refcnt def test_automatic_tp_dealloc(self): + import sys + if hasattr(sys, 'gettotalrefcount'): + import pytest + pytest.skip("Test fails on debug build: https://github.com/hpyproject/hpy/issues/255") if not self.supports_refcounts(): import pytest pytest.skip("CPython only") @@ -265,8 +277,11 @@ def test_automatic_tp_clear(self): if not self.supports_refcounts(): import pytest pytest.skip("CPython only") - import sys + if hasattr(sys, 'gettotalrefcount'): + import pytest + pytest.skip("Test fails on debug build: https://github.com/hpyproject/hpy/issues/255") + import gc mod = self.make_module(""" @DEFINE_PairObject