MCPcopy Index your code
hub / github.com/google/adk-python / clean_core_venv

Function clean_core_venv

tests/unittests/test_optional_dependencies.py:39–61  ·  view source on GitHub ↗

Creates a clean venv with only core ADK installed (requires network).

(tmp_path_factory)

Source from the content-addressed store, hash-verified

37
38@pytest.fixture(scope="session")
39def clean_core_venv(tmp_path_factory):
40 """Creates a clean venv with only core ADK installed (requires network)."""
41 if not RUN_INTEGRATION:
42 pytest.skip("Integration tests requiring network are disabled by default.")
43
44 venv_path = tmp_path_factory.mktemp("adk_core_venv")
45 python_exe = venv_path / "bin" / "python"
46
47 # Create venv using uv for speed
48 subprocess.run(
49 ["uv", "venv", str(venv_path), "--python", "3.11"],
50 check=True,
51 capture_output=True,
52 )
53
54 # Install core ADK from local repo (uses current pyproject.toml)
55 subprocess.run(
56 ["uv", "pip", "install", "--python", str(python_exe), str(_REPO_ROOT)],
57 check=True,
58 capture_output=True,
59 )
60
61 return python_exe
62
63
64# =============================================================================

Callers

nothing calls this directly

Calls 2

skipMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected