Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

551 B
Raw Blame
import pytest
from e2b import AsyncSandbox


@pytest.mark.skip_debug()
async def test_pause_sandbox(async_sandbox: AsyncSandbox):
    await AsyncSandbox.pause(async_sandbox.sandbox_id)
    assert not await async_sandbox.is_running()


@pytest.mark.skip_debug()
async def test_resume_sandbox(async_sandbox: AsyncSandbox):
    # pause
    await AsyncSandbox.pause(async_sandbox.sandbox_id)
    assert not await async_sandbox.is_running()

    # resume
    await AsyncSandbox.connect(async_sandbox.sandbox_id)
    assert await async_sandbox.is_running()