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
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ async def poll_status(
if on_poll is not None:
poll_handler = on_poll(result)
if inspect.isawaitable(poll_handler):
await poll_handler
_ = await poll_handler

status = result.get("status", "processing")
if status in ("Completed", "Error"):
Expand Down
2 changes: 1 addition & 1 deletion src/ContentProcessorWorkflow/src/utils/http_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ async def poll_until_done(
if on_poll is not None:
maybe_awaitable = on_poll(resp)
if inspect.isawaitable(maybe_awaitable):
await maybe_awaitable
_ = await maybe_awaitable

if resp.status in done:
return resp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_count_documents(mock_certifi, mock_mongo_client):
result = helper.count_documents({"key": "value"})
assert result == 42

result = helper.count_documents()
helper.count_documents()
mock_container.count_documents.assert_called_with({})


Expand Down
6 changes: 0 additions & 6 deletions src/tests/ContentProcessorWorkflow/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@
if str(workflow_src_path) not in sys.path:
sys.path.insert(0, str(workflow_src_path))

# Import sitecustomize if available
try:
import sitecustomize # noqa: F401
except Exception:
pass

pytest_plugins = ["pytest_mock"]
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_caches_instance(self) -> None:
assert a is b

def test_with_factory(self) -> None:
ctx = AppContext().add_singleton(_S1, lambda: _S1())
ctx = AppContext().add_singleton(_S1, _S1)
a = ctx.get_service(_S1)
b = ctx.get_service(_S1)
assert a is b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from __future__ import annotations

import asyncio
import sys
from pathlib import Path
from unittest.mock import AsyncMock, MagicMock, patch

Expand All @@ -22,8 +21,6 @@
# The @handler decorator in agent_framework validates type annotations at
# import time, which fails in the test environment. Patch it to a no-op
# before importing the executor module.
_orig_handler = sys.modules.get("agent_framework", MagicMock()).handler # type: ignore[union-attr]

with patch("agent_framework.handler", lambda fn: fn):
from steps.rai.executor.rai_executor import RAIExecutor

Expand Down
Loading