Skip to content

Commit

Permalink
Fix test scie bounds now that 3.8 is removed from PBS current.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Oct 27, 2024
1 parent 950fa7c commit 1946294
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
12 changes: 11 additions & 1 deletion testing/scie.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright 2024 Pex project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import pytest

from pex.scie import SciePlatform
from testing import IS_PYPY, PY_VER
Expand All @@ -18,4 +19,13 @@ def has_provider():
else:
return PY_VER >= (3, 6)
else:
return (3, 8) <= PY_VER < (3, 14)
return (3, 9) <= PY_VER < (3, 14)


skip_if_no_provider = pytest.mark.skipif(
not has_provider(),
reason=(
"Either A PBS or PyPy release must be available for the current interpreter to run this "
"test."
),
)
11 changes: 2 additions & 9 deletions tests/integration/scie/test_pex_scie.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from pex.typing import TYPE_CHECKING
from pex.version import __version__
from testing import IS_PYPY, PY_VER, make_env, run_pex_command, scie
from testing.scie import skip_if_no_provider

if TYPE_CHECKING:
from typing import Any, Iterable, List
Expand Down Expand Up @@ -101,7 +102,7 @@ def test_basic(


@pytest.mark.skipif(
(PY_VER < (3, 8) and not IS_PYPY) or PY_VER >= (3, 14),
not scie.has_provider(),
reason="Scie output is not supported for {interpreter}".format(interpreter=sys.version),
)
@pytest.mark.skipif(
Expand Down Expand Up @@ -537,14 +538,6 @@ def bar(tmpdir):
return make_project(tmpdir, "bar")


skip_if_no_provider = pytest.mark.skipif(
not scie.has_provider(),
reason=(
"Either A PBS or PyPy release must be available for the current interpreter to run this test."
),
)


@skip_if_no_provider
@pytest.mark.parametrize(
"execution_mode_args",
Expand Down

0 comments on commit 1946294

Please sign in to comment.