Integration tests for the deepagents SandboxProvider abstraction.
Implementers should subclass this test suite and provide a fixture that returns a
clean SandboxProvider instance.
The provider is expected to support:
list() returning all sandboxes visible to the providerget_or_create(sandbox_id=None) creating a sandboxget_or_create(sandbox_id=...) reconnecting to an existing sandbox without
creating a new onedelete() being idempotentExample:
from __future__ import annotations
from typing import Any
import pytest
from deepagents.backends.sandbox import SandboxProvider
from langchain_tests.integration_tests import SandboxProviderIntegrationTests
from langchain_acme_sandbox import AcmeSandboxProvider
class TestAcmeSandboxProviderStandard(SandboxProviderIntegrationTests):
@pytest.fixture
def sandbox_provider(self) -> SandboxProvider[Any]:
# Return a provider instance in a clean state.
return AcmeSandboxProvider(api_key="...")
@property
def has_async(self) -> bool:
return TrueBase class for standard tests.
Base class for sandbox provider integration tests.