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
test(rag): close temp file before encoding detection in test_helpers (#39896)
AlexMultiAgent702595c9eeed
diff --git a/api/tests/unit_tests/core/rag/extractor/test_helpers.py b/api/tests/unit_tests/core/rag/extractor/test_helpers.pyindex 43ef3283392..608bc1c2ab7 100644--- a/api/tests/unit_tests/core/rag/extractor/test_helpers.py+++ b/api/tests/unit_tests/core/rag/extractor/test_helpers.py@@ -1,3 +1,4 @@+import osimport tempfilefrom pathlib import Pathfrom types import SimpleNamespace@@ -45,11 +46,14 @@ class TestHelpers:assert encodings[0].encoding == "ascii"def test_detect_file_encodings(self) -> None:- with tempfile.NamedTemporaryFile(mode="w+t", suffix=".txt") as temp:+ with tempfile.NamedTemporaryFile(mode="w+t", suffix=".txt", delete=False) as temp:temp.write("Shared data")temp.flush()temp_path = temp.name+ try:encodings = detect_file_encodings(temp_path)+ finally:+ os.unlink(temp_path)assert len(encodings) == 1assert encodings[0].encoding in {"utf_8", "ascii"}