refactor tests
Publish container image / Build and push (push) Successful in 32s

This commit is contained in:
2026-07-26 23:49:40 +02:00
parent 5ef10d28fe
commit ce9f1e3d20
32 changed files with 1546 additions and 1923 deletions
+26
View File
@@ -0,0 +1,26 @@
from dataclasses import dataclass
from pathlib import Path
import pytest
from agentci.engine import _sqlite
from agentci.engine.repository import Repository
@pytest.fixture
async def engine_repository(tmp_path: Path) -> Repository:
repository = Repository(tmp_path / "state.sqlite3")
await repository.initialize()
return repository
@dataclass
class SQLiteClock:
now: str = "2026-02-01T00:00:00+00:00"
@pytest.fixture
def sqlite_clock(monkeypatch: pytest.MonkeyPatch) -> SQLiteClock:
clock = SQLiteClock()
monkeypatch.setattr(_sqlite, "now", lambda: clock.now)
return clock