Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: flaky WordExtractor close test in CI (#35652)
kenwoodjw0536549f735d
diff --git a/api/tests/unit_tests/core/rag/extractor/test_word_extractor.py b/api/tests/unit_tests/core/rag/extractor/test_word_extractor.pyindex 0220fb6d4aa..b9f2449cfb0 100644--- a/api/tests/unit_tests/core/rag/extractor/test_word_extractor.py+++ b/api/tests/unit_tests/core/rag/extractor/test_word_extractor.py@@ -1,14 +1,12 @@"""Primarily used for testing merged cell scenarios"""-import gcimport ioimport osimport tempfile-import warningsfrom collections import UserDictfrom pathlib import Pathfrom types import SimpleNamespace-from unittest.mock import AsyncMock, MagicMock+from unittest.mock import MagicMockimport pytestfrom docx import Document@@ -377,23 +375,21 @@ def test_close_is_idempotent():extractor.temp_file.close.assert_called_once()-def test_close_handles_async_close_mock():+async def _async_close() -> None:+ return None+++def test_close_closes_awaitable_close_result():extractor = object.__new__(WordExtractor)extractor._closed = Falseextractor.temp_file = MagicMock()- extractor.temp_file.close = AsyncMock()+ close_result = _async_close()+ extractor.temp_file.close = MagicMock(return_value=close_result)- with warnings.catch_warnings(record=True) as caught:- warnings.simplefilter("always")- extractor.close()- gc.collect()+ extractor.close()+ assert close_result.cr_frame is Noneextractor.temp_file.close.assert_called_once()- assert not [- warning- for warning in caught- if issubclass(warning.category, RuntimeWarning) and "AsyncMockMixin._execute_mock_call" in str(warning.message)- ]def test_extract_images_handles_invalid_external_cases(monkeypatch):