Skip to content

Commit 0cd4b7d

Browse files
authored
Fix CI bitrot. (#2605)
1 parent a346870 commit 0cd4b7d

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

tests/integration/test_lock_resolver.py

+20-18
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from testing import IS_PYPY, PY_VER, built_wheel, make_env, run_pex_command
2626
from testing.cli import run_pex3
2727
from testing.lock import index_lock_artifacts
28-
from testing.pytest.tmp import TempdirFactory
28+
from testing.pytest.tmp import Tempdir, TempdirFactory
2929

3030
if TYPE_CHECKING:
3131
from typing import Any, Mapping, Tuple
@@ -280,29 +280,31 @@ def test_unavailable_artifacts(
280280
)
281281

282282

283-
@pytest.fixture(scope="module")
284-
def requests_lock_universal(
285-
tmpdir_factory, # type: TempdirFactory
286-
request, # type: Any
287-
):
288-
# type: (...) -> str
289-
290-
lock = tmpdir_factory.mktemp("locks", request=request).join("requests-universal.lock")
291-
run_pex3(
292-
"lock", "create", "--style", "universal", "requests[security]==2.25.1", "-o", lock
293-
).assert_success()
294-
return lock
295-
296-
297283
def test_multiplatform(
298-
tmpdir, # type: Any
299-
requests_lock_universal, # type: str
284+
tmpdir, # type: Tempdir
300285
py38, # type: PythonInterpreter
301286
py310, # type: PythonInterpreter
302287
):
303288
# type: (...) -> None
304289

305-
pex_file = os.path.join(str(tmpdir), "pex.file")
290+
requests_lock_universal = tmpdir.join("requests-universal.lock")
291+
run_pex3(
292+
"lock",
293+
"create",
294+
"--resolver-version",
295+
"pip-2020-resolver",
296+
"--style",
297+
"universal",
298+
"--interpreter-constraint",
299+
# N.B.: Ensure the lock covers 3.8 and 3.10, which we use below to build a multiplatform
300+
# PEX.
301+
">=3.8,!=3.9.*,<3.11",
302+
"requests[security]==2.25.1",
303+
"-o",
304+
requests_lock_universal,
305+
).assert_success()
306+
307+
pex_file = tmpdir.join("pex.file")
306308
run_pex_command(
307309
args=[
308310
"--python",

0 commit comments

Comments
 (0)