Skip to content

Commit 9d10fb4

Browse files
committed
Skip tests of legacy features in NFI mode
1 parent 5ed5c5d commit 9d10fb4

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

graalpython/lib-graalpython/modules/hpy/test/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ def compiler(request, tmpdir, hpy_devel, hpy_abi):
4646
compiler_verbose = request.config.getoption('--compiler-v')
4747
return ExtensionCompiler(tmpdir, hpy_devel, hpy_abi,
4848
compiler_verbose=compiler_verbose)
49+
50+
@pytest.fixture()
51+
def skip_nfi(self, hpy_abi):
52+
# skip all tests in this class for NFI mode
53+
if hpy_abi == 'nfi':
54+
pytest.skip()

graalpython/lib-graalpython/modules/hpy/test/test_cpy_compat.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ class TestCPythonCompatibility(HPyTest):
3737
# really make sens on PyPy. We still run the functions to ensure they do
3838
# not crash, though.
3939

40-
@pytest.fixture()
41-
def skip_nfi(self, hpy_abi):
42-
# skip all tests in this class for NFI mode
43-
if hpy_abi == 'nfi':
44-
pytest.skip()
45-
4640
def test_frompyobject(self):
4741
mod = self.make_module("""
4842
#include <Python.h>

graalpython/lib-graalpython/modules/hpy/test/test_hpytype_legacy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .test_hpytype import PointTemplate, TestType as _TestType
2828

2929

30+
@pytest.mark.usefixtures('skip_nfi')
3031
class LegacyPointTemplate(PointTemplate):
3132
"""
3233
Override PointTemplate to instead define a legacy point type that
@@ -47,11 +48,13 @@ class LegacyPointTemplate(PointTemplate):
4748
_IS_LEGACY = ".legacy = true,"
4849

4950

51+
@pytest.mark.usefixtures('skip_nfi')
5052
class TestLegacyType(_TestType):
5153

5254
ExtensionTemplate = LegacyPointTemplate
5355

5456

57+
@pytest.mark.usefixtures('skip_nfi')
5558
class TestCustomLegacyFeatures(HPyTest):
5659

5760
def test_legacy_methods(self):

graalpython/lib-graalpython/modules/hpy/test/test_slots_legacy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,19 @@
2828
from .test_slots import TestSlots as _TestSlots, TestSqSlots as _TestSqSlots
2929

3030

31+
@pytest.mark.usefixtures('skip_nfi')
3132
class TestLegacySlots(_TestSlots):
3233

3334
ExtensionTemplate = LegacyPointTemplate
3435

3536

37+
@pytest.mark.usefixtures('skip_nfi')
3638
class TestLegacySqSlots(_TestSqSlots):
3739

3840
ExtensionTemplate = LegacyPointTemplate
3941

4042

43+
@pytest.mark.usefixtures('skip_nfi')
4144
class TestCustomLegacySlotsFeatures(HPyTest):
4245

4346
def test_legacy_slots(self):

0 commit comments

Comments
 (0)