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

Function test_pex_python_symlink

tests/integration/test_integration.py:352–362  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

350
351@pytest.mark.skipif(WINDOWS, reason="No symlinks on windows")
352def test_pex_python_symlink(tmpdir):
353 # type: (Any) -> None
354 symlink_path = os.path.join(str(tmpdir), "python-symlink")
355 safe_symlink(sys.executable, symlink_path)
356 pexrc_path = os.path.join(str(tmpdir), ".pexrc")
357 with open(pexrc_path, "w") as pexrc:
358 pexrc.write("PEX_PYTHON=%s" % symlink_path)
359
360 body = "print('Hello')"
361 _, rc = run_simple_pex_test(body, coverage=True, env=make_env(HOME=tmpdir))
362 assert rc == 0
363
364
365def test_entry_point_exit_code(tmpdir):

Callers

nothing calls this directly

Calls 5

safe_symlinkFunction · 0.90
run_simple_pex_testFunction · 0.90
make_envFunction · 0.90
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected