Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

test(sdk): remove explicit Python SDK test skips (#21783)

Sbaaoui Idriss2c8cc8ad9b7f
diff --git a/test/testcases/test_sdk_api/test_file_management_within_dataset/test_parse_documents.py b/test/testcases/test_sdk_api/test_file_management_within_dataset/test_parse_documents.py
index 3013c482e5..d25a92b738 100644
--- a/test/testcases/test_sdk_api/test_file_management_within_dataset/test_parse_documents.py
+++ b/test/testcases/test_sdk_api/test_file_management_within_dataset/test_parse_documents.py
@@ -322,8 +322,16 @@ def test_terminal_status_from_previous_parse_run_is_not_reused(monkeypatch):
"ingestion_status, progress, expected_status",
[
("COMPLETED", 1.0, "DONE"),
- ("FAILED", -1.0, "FAIL"),
- ("STOPPED", 0.0, "CANCEL"),
+ pytest.param(
+ "FAILED",
+ -1.0,
+ "FAIL",
+ ),
+ pytest.param(
+ "STOPPED",
+ 0.0,
+ "CANCEL",
+ ),
],
)
def test_parse_documents_returns_documented_terminal_status(monkeypatch, ingestion_status, progress, expected_status):
diff --git a/test/testcases/test_sdk_api/test_file_management_within_dataset/test_update_document.py b/test/testcases/test_sdk_api/test_file_management_within_dataset/test_update_document.py
index 8134ff2287..c0d3a6b3b8 100644
--- a/test/testcases/test_sdk_api/test_file_management_within_dataset/test_update_document.py
+++ b/test/testcases/test_sdk_api/test_file_management_within_dataset/test_update_document.py
@@ -26,15 +26,15 @@ class TestDocumentsUpdated:
@pytest.mark.parametrize(
"name, expected_message",
[
- ("new_name.txt", ""),
- (f"{'a' * 251}.txt", ""),
+ pytest.param("new_name.txt", ""),
+ pytest.param(f"{'a' * 251}.txt", ""),
(0, "Field: <name> - Message: <Input should be a valid string> - Value: <0>"),
(None, "Field: <name> - Message: <Input should be a valid string> - Value: <None>"),
("", "the extension of file can't be changed"),
("ragflow_test_upload_0", "the extension of file can't be changed"),
("ragflow_test_upload_1.txt", "duplicated document name in the same dataset"),
("RAGFLOW_TEST_UPLOAD_1.TXT", "duplicated document name in the same dataset"),
- ("RAGFLOW_TEST_UPLOAD_0.TXT", ""),
+ pytest.param("RAGFLOW_TEST_UPLOAD_0.TXT", ""),
],
)
def test_name(self, add_documents, name, expected_message):
diff --git a/test/testcases/test_sdk_api/test_message_management/test_get_message_content.py b/test/testcases/test_sdk_api/test_message_management/test_get_message_content.py
index b075f95739..c35a78479c 100644
--- a/test/testcases/test_sdk_api/test_message_management/test_get_message_content.py
+++ b/test/testcases/test_sdk_api/test_message_management/test_get_message_content.py
@@ -42,7 +42,7 @@ class TestGetMessageContent:
assert_content(content, payload, memory.id)
assert content["status"] is True, content
- def test_get_message_content_embedding(self, populated_memory, doc_engine):
+ def test_get_message_content_embedding(self, populated_memory):
memory = populated_memory["memory"]
content = memory.get_message_content(populated_memory["rows"][0]["message_id"])
vector = content["content_embed"]
diff --git a/test/testcases/test_sdk_api/test_message_management/test_list_message.py b/test/testcases/test_sdk_api/test_message_management/test_list_message.py
index 27de3f4fc6..62b347f8cc 100644
--- a/test/testcases/test_sdk_api/test_message_management/test_list_message.py
+++ b/test/testcases/test_sdk_api/test_message_management/test_list_message.py
@@ -91,7 +91,7 @@ class TestMessageList:
result = populated_memory["memory"].list_memory_messages(keywords=expected[0]["session_id"])
_assert_messages(result, populated_memory, expected)
- def test_search_keyword_substring(self, populated_memory, doc_engine):
+ def test_search_keyword_substring(self, populated_memory):
expected = populated_memory["rows"][2:3]
keyword = expected[0]["session_id"][4:]
assert keyword != expected[0]["session_id"]
diff --git a/test/testcases/test_sdk_api/test_message_management/test_update_message_status.py b/test/testcases/test_sdk_api/test_message_management/test_update_message_status.py
index 66fb58c652..6f9b5ad787 100644
--- a/test/testcases/test_sdk_api/test_message_management/test_update_message_status.py
+++ b/test/testcases/test_sdk_api/test_message_management/test_update_message_status.py
@@ -81,7 +81,7 @@ class TestUpdateMessageStatus:
with pytest.raises(Exception, match="message_id|formatted as memory_id:message_id"):
populated_memory["memory"].update_message_status(message_id, False)
- def test_nonexistent_message(self, populated_memory, doc_engine):
+ def test_nonexistent_message(self, populated_memory):
with pytest.raises(Exception, match="Message .*not found"):
populated_memory["memory"].update_message_status(9223372036854775807, False)