Skip to content

armgit / dify

Public Imported from GitHub
0

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.

test: remove print code (#25481)

GuanMuc7868fb176d6
diff --git a/api/tests/unit_tests/core/rag/extractor/firecrawl/test_firecrawl.py b/api/tests/unit_tests/core/rag/extractor/firecrawl/test_firecrawl.py
index 607728efd8e..6689e13b96a 100644
--- a/api/tests/unit_tests/core/rag/extractor/firecrawl/test_firecrawl.py
+++ b/api/tests/unit_tests/core/rag/extractor/firecrawl/test_firecrawl.py
@@ -20,7 +20,6 @@ def test_firecrawl_web_extractor_crawl_mode(mocker):
}
mocker.patch("requests.post", return_value=_mock_response(mocked_firecrawl))
job_id = firecrawl_app.crawl_url(url, params)
- print(f"job_id: {job_id}")
assert job_id is not None
assert isinstance(job_id, str)
diff --git a/api/tests/unit_tests/core/variables/test_segment.py b/api/tests/unit_tests/core/variables/test_segment.py
index 4c8d983d205..c9cfabca6e3 100644
--- a/api/tests/unit_tests/core/variables/test_segment.py
+++ b/api/tests/unit_tests/core/variables/test_segment.py
@@ -129,7 +129,6 @@ class TestSegmentDumpAndLoad:
"""Test basic segment serialization compatibility"""
model = _Segments(segments=[IntegerSegment(value=1), StringSegment(value="a")])
json = model.model_dump_json()
- print("Json: ", json)
loaded = _Segments.model_validate_json(json)
assert loaded == model
@@ -137,7 +136,6 @@ class TestSegmentDumpAndLoad:
"""Test number segment serialization compatibility"""
model = _Segments(segments=[IntegerSegment(value=1), FloatSegment(value=1.0)])
json = model.model_dump_json()
- print("Json: ", json)
loaded = _Segments.model_validate_json(json)
assert loaded == model
@@ -145,7 +143,6 @@ class TestSegmentDumpAndLoad:
"""Test variable serialization compatibility"""
model = _Variables(variables=[IntegerVariable(value=1, name="int"), StringVariable(value="a", name="str")])
json = model.model_dump_json()
- print("Json: ", json)
restored = _Variables.model_validate_json(json)
assert restored == model
diff --git a/api/tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py b/api/tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py
index 2d8d433c46b..b8f901770c0 100644
--- a/api/tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py
+++ b/api/tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py
@@ -342,4 +342,3 @@ def test_http_request_node_form_with_multiple_files(monkeypatch: pytest.MonkeyPa
assert result.status == WorkflowNodeExecutionStatus.SUCCEEDED
assert result.outputs is not None
assert result.outputs["body"] == '{"status":"success"}'
- print(result.outputs["body"])
diff --git a/api/tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py b/api/tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py
index 987eaf75345..49a88e57b31 100644
--- a/api/tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py
+++ b/api/tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py
@@ -143,15 +143,11 @@ def test_remove_first_from_array():
node.init_node_data(node_config["data"])
# Skip the mock assertion since we're in a test environment
- # Print the variable before running
- print(f"Before: {variable_pool.get(['conversation', conversation_variable.name]).to_object()}")
# Run the node
result = list(node.run())
- # Print the variable after running and the result
- print(f"After: {variable_pool.get(['conversation', conversation_variable.name]).to_object()}")
- print(f"Result: {result}")
+ # Completed run
got = variable_pool.get(["conversation", conversation_variable.name])
assert got is not None
diff --git a/api/tests/unit_tests/utils/structured_output_parser/test_structured_output_parser.py b/api/tests/unit_tests/utils/structured_output_parser/test_structured_output_parser.py
index 93284eed4b3..9046f785d21 100644
--- a/api/tests/unit_tests/utils/structured_output_parser/test_structured_output_parser.py
+++ b/api/tests/unit_tests/utils/structured_output_parser/test_structured_output_parser.py
@@ -279,8 +279,6 @@ def test_structured_output_parser():
]
for case in testcases:
- print(f"Running test case: {case['name']}")
-
# Setup model entity
model_schema = get_model_entity(case["provider"], case["model_name"], case["support_structure_output"])