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

Function test_sys_path

tests/test_interpreter.py:494–502  ·  view source on GitHub ↗
(python)

Source from the content-addressed store, hash-verified

492 ],
493)
494def test_sys_path(python):
495 # type: (str) -> None
496
497 interp = PythonInterpreter.from_binary(python)
498 _, stdout, _ = interp.execute(args=["-c", r"import sys; print('\n'.join(sys.path))"])
499 assert tuple(entry for entry in stdout.splitlines() if entry) == interp.sys_path, (
500 'Its expected the sys_path matches the runtime sys.path with the exception of the PWD ("") '
501 "head entry."
502 )
503
504
505def test_sys_path_leak_for_current(tmpdir):

Callers

nothing calls this directly

Calls 2

from_binaryMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected