Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Build SDK with native extension
run: |
uv venv --python "${UV_PYTHON:-${{ matrix.python-version }}}" .venv
uv sync --group test --no-group dev --extra claude --extra codex --extra deepagents ${{ matrix.python-version != '3.11' && '--extra harbor' || '' }} ${{ matrix.python-version != '3.14' && '--extra hermes' || '' }} --extra relay --extra runtime
uv sync --group test --no-group dev --extra claude --extra codex --extra deepagents ${{ matrix.python-version != '3.11' && '--extra harbor' || '' }} ${{ matrix.python-version != '3.14' && '--extra hermes-agent' || '' }} --extra relay --extra runtime

- name: Run pytest
run: |
Expand Down
17 changes: 13 additions & 4 deletions tests/python/test_installed_adapter_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,21 @@ def _python_sysconfig_path(python: Path, name: str) -> Path:
)
)

def _create_venv(venv_dir: Path):
# Use `symlinks=True` on Posix systems to work-around for
# https://github.com/astral-sh/uv/issues/8879
venv.EnvBuilder(with_pip=False,
symlinks=(os.name != "nt")).create(venv_dir)


@pytest.fixture(name="adapter_python")
def adapter_python_fixture(tmp_path: Path) -> tuple[Path, Path]:
is_windows = os.name == "nt"
adapter_env = tmp_path / "adapter-env"
venv.EnvBuilder(with_pip=False).create(adapter_env)
python = adapter_env / ("Scripts/python.exe" if os.name == "nt" else "bin/python")

_create_venv(adapter_env)

python = adapter_env / ("Scripts/python.exe" if is_windows else "bin/python")
data_root = _python_sysconfig_path(python, "data")
descriptor = _write_descriptor(data_root, "configured.adapter")
return python, descriptor
Expand Down Expand Up @@ -162,7 +171,7 @@ def test_adapter_python_data_directory_replaces_current_data_directory(
patch_sysconfig_data(current_data_root)

adapter_env = tmp_path / "adapter-env"
venv.EnvBuilder(with_pip=False).create(adapter_env)
_create_venv(adapter_env)
adapter_python = adapter_env / (
"Scripts/python.exe" if os.name == "nt" else "bin/python"
)
Expand Down Expand Up @@ -235,7 +244,7 @@ def test_unset_harness_python_env_uses_sdk_interpreter(

def test_adapter_python_data_path_query_times_out(tmp_path: Path):
adapter_env = tmp_path / "slow-adapter-env"
venv.EnvBuilder(with_pip=False).create(adapter_env)
_create_venv(adapter_env)
adapter_python = adapter_env / (
"Scripts/python.exe" if os.name == "nt" else "bin/python"
)
Expand Down
Loading