Skip to content

Commit

Permalink
move the ONLY_LINUX marker to support.py
Browse files Browse the repository at this point in the history
  • Loading branch information
antocuni committed Nov 24, 2022
1 parent 1f70e65 commit 4907ee8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
# True if we are running on the CPython debug build
IS_PYTHON_DEBUG_BUILD = hasattr(sys, 'gettotalrefcount')

# pytest marker to run tests only on linux
ONLY_LINUX = pytest.mark.skipif(sys.platform!='linux', reason='linux only')


def reindent(s, indent):
s = textwrap.dedent(s)
return ''.join(' '*indent + line if line.strip() else line
Expand Down
4 changes: 2 additions & 2 deletions test/test_legacy_forbidden.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import sys
import pytest
from .support import HPyTest, make_hpy_abi_fixture
from .support import HPyTest, make_hpy_abi_fixture, ONLY_LINUX

# this is not strictly correct, we should check whether the actualy compiler
# is GCC. But for the CI and most cases, it's enough to assume that if we are
Expand All @@ -14,7 +14,7 @@
# We need this because some of the nice compilation errors (such as the ones
# causes by _HPY_LEGACY) are triggered only by gcc. Would be nice to have them
# also for other compilers
ONLY_GCC = pytest.mark.skipif(sys.platform!='linux', reason='GCC only')
ONLY_GCC = ONLY_LINUX


class TestLegacyForbidden(HPyTest):
Expand Down

0 comments on commit 4907ee8

Please sign in to comment.