MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_sandbox_venv_in_path

Function test_sandbox_venv_in_path

e2e/python/test_sandbox_venv.py:29–39  ·  view source on GitHub ↗

Non-interactive exec sees /sandbox/.venv/bin in PATH.

(
    sandbox: Callable[..., Sandbox],
)

Source from the content-addressed store, hash-verified

27
28
29def test_sandbox_venv_in_path(
30 sandbox: Callable[..., Sandbox],
31) -> None:
32 """Non-interactive exec sees /sandbox/.venv/bin in PATH."""
33 with sandbox(delete_on_exit=True) as sb:
34 result = sb.exec(["bash", "-c", "echo $PATH"], timeout_seconds=20)
35 assert result.exit_code == 0, result.stderr
36 path_dirs = result.stdout.strip().split(":")
37 assert "/sandbox/.venv/bin" in path_dirs, (
38 f"Expected /sandbox/.venv/bin in PATH, got: {result.stdout.strip()}"
39 )
40
41
42def test_pip_install_in_sandbox(

Callers

nothing calls this directly

Calls 2

sandboxFunction · 0.70
execMethod · 0.45

Tested by

no test coverage detected