MCPcopy
hub / github.com/pex-tool/pex / test_multiplatform

Function test_multiplatform

tests/integration/test_lock_resolver.py:294–335  ·  view source on GitHub ↗
(
    tmpdir,  # type: Tempdir
    py39,  # type: PythonInterpreter
    py311,  # type: PythonInterpreter
)

Source from the content-addressed store, hash-verified

292 ),
293)
294def test_multiplatform(
295 tmpdir, # type: Tempdir
296 py39, # type: PythonInterpreter
297 py311, # type: PythonInterpreter
298):
299 # type: (...) -> None
300
301 requests_lock_universal = tmpdir.join("requests-universal.lock")
302 run_pex3(
303 "lock",
304 "create",
305 "--resolver-version",
306 "pip-2020-resolver",
307 "--style",
308 "universal",
309 "--interpreter-constraint",
310 # N.B.: Ensure the lock covers 3.8 and 3.10, which we use below to build a multiplatform
311 # PEX.
312 ">=3.9,!=3.10.*,<3.12",
313 "requests[security]==2.25.1",
314 "-o",
315 requests_lock_universal,
316 ).assert_success()
317
318 pex_file = tmpdir.join("pex.file")
319 run_pex_command(
320 args=[
321 "--python",
322 py39.binary,
323 "--python",
324 py311.binary,
325 "--lock",
326 requests_lock_universal,
327 "requests[security]",
328 "-o",
329 pex_file,
330 ]
331 ).assert_success()
332
333 check_command = [pex_file, "-c", "import requests"]
334 py39.execute(check_command)
335 py311.execute(check_command)
336
337
338def test_issue_1413_portable_find_links(tmpdir):

Callers

nothing calls this directly

Calls 5

run_pex3Function · 0.90
run_pex_commandFunction · 0.90
assert_successMethod · 0.80
joinMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected