Skip to content

Commit 28ceae8

Browse files
committed
style: apply ruff format to test files
1 parent 2c16468 commit 28ceae8

2 files changed

Lines changed: 43 additions & 17 deletions

File tree

‎tests/test_mcp/test_server.py‎

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,21 +158,39 @@ def test_all_tools_registered(self):
158158
tool_names = {t.name for t in app._tool_manager.list_tools()}
159159
expected = {
160160
# Lifecycle
161-
"open_document", "save_document", "close_document",
162-
"reload_document", "force_save",
161+
"open_document",
162+
"save_document",
163+
"close_document",
164+
"reload_document",
165+
"force_save",
163166
# Paragraphs & track changes
164-
"list_paragraphs", "replace_text", "delete_text",
165-
"insert_after", "insert_before", "batch_edit",
166-
"rewrite_paragraph", "batch_rewrite",
167+
"list_paragraphs",
168+
"replace_text",
169+
"delete_text",
170+
"insert_after",
171+
"insert_before",
172+
"batch_edit",
173+
"rewrite_paragraph",
174+
"batch_rewrite",
167175
# Comments
168-
"add_comment", "list_comments", "reply_to_comment",
169-
"resolve_comment", "delete_comment",
176+
"add_comment",
177+
"list_comments",
178+
"reply_to_comment",
179+
"resolve_comment",
180+
"delete_comment",
170181
# Revisions
171-
"list_revisions", "accept_revision", "reject_revision",
172-
"accept_all", "reject_all",
182+
"list_revisions",
183+
"accept_revision",
184+
"reject_revision",
185+
"accept_all",
186+
"reject_all",
173187
# Read & Exploration
174-
"find_text", "count_matches", "get_visible_text",
175-
"search_text", "get_paragraph_text", "get_document_info",
188+
"find_text",
189+
"count_matches",
190+
"get_visible_text",
191+
"search_text",
192+
"get_paragraph_text",
193+
"get_document_info",
176194
}
177195
assert tool_names == expected
178196

‎tests/test_mcp/test_tools.py‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,13 @@ def test_batch_edit(self, server, mcp_temp_docx):
364364
open_document(server, str(mcp_temp_docx), author="Tester")
365365
para = _get_paragraph_ref(server, str(mcp_temp_docx), "quick brown fox")
366366

367-
result = batch_edit(server, str(mcp_temp_docx), [
368-
{"action": "replace", "find": "quick", "replace_with": "slow", "paragraph": para},
369-
])
367+
result = batch_edit(
368+
server,
369+
str(mcp_temp_docx),
370+
[
371+
{"action": "replace", "find": "quick", "replace_with": "slow", "paragraph": para},
372+
],
373+
)
370374

371375
assert result["success"] is True
372376
assert "new_refs" in result
@@ -378,9 +382,13 @@ def test_batch_edit_invalid_operation(self, server, mcp_temp_docx):
378382

379383
open_document(server, str(mcp_temp_docx), author="Tester")
380384

381-
result = batch_edit(server, str(mcp_temp_docx), [
382-
{"action": "replace"}, # missing required fields
383-
])
385+
result = batch_edit(
386+
server,
387+
str(mcp_temp_docx),
388+
[
389+
{"action": "replace"}, # missing required fields
390+
],
391+
)
384392

385393
assert result["success"] is False
386394

0 commit comments

Comments
 (0)