mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-23 05:35:30 +00:00
Handle optional Docker dependencies in benchmark unit tests
This commit is contained in:
parent
461e4c6fb7
commit
1d210d0f40
3 changed files with 7 additions and 4 deletions
2
.github/workflows/ci-python-tests.yml
vendored
2
.github/workflows/ci-python-tests.yml
vendored
|
|
@ -38,7 +38,7 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install -e reme_studio -e ".[dev,core]"
|
||||
pip install -e reme_studio -e ".[dev,core,benchmark-docker]"
|
||||
pip install --no-deps -e plugins/auto-fin
|
||||
pip install -e plugins/daily_paper
|
||||
pip install -e plugins/lme -e plugins/beam
|
||||
|
|
|
|||
|
|
@ -1299,6 +1299,7 @@ async def test_pool_retries_strict_delete_without_replacing_uncertain_container(
|
|||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
pytest.importorskip("aiodocker")
|
||||
from deploy.benchmark_docker.direct_docker_workspace import DirectDockerWorkspace
|
||||
|
||||
workspaces = []
|
||||
|
|
@ -1306,6 +1307,8 @@ async def test_pool_retries_strict_delete_without_replacing_uncertain_container(
|
|||
client = SimpleNamespace(close=AsyncMock())
|
||||
|
||||
class StrictWorkspace(DirectDockerWorkspace):
|
||||
# Provisioning deliberately populates the inherited Docker handles.
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
async def _provision_backend(self):
|
||||
self._container, self._client, self._backend = container, client, TimedOutBackend()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
"""Direct workspace lifecycle without a Docker daemon."""
|
||||
|
||||
# pylint: disable=missing-function-docstring,protected-access
|
||||
# pylint: disable=missing-function-docstring,protected-access,wrong-import-position
|
||||
|
||||
import asyncio
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
from aiodocker.exceptions import DockerError
|
||||
import pytest
|
||||
|
||||
from deploy.benchmark_docker.direct_docker_workspace import DirectDockerWorkspace
|
||||
DockerError = pytest.importorskip("aiodocker.exceptions").DockerError
|
||||
from deploy.benchmark_docker.direct_docker_workspace import DirectDockerWorkspace # noqa: E402
|
||||
|
||||
|
||||
def make_workspace():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue