Skip to content

Commit 36b4e8f

Browse files
committed
refactor(tests/test_server.py): remove commented-out code to improve code clarity and maintainability
1 parent 1d8c0a7 commit 36b4e8f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

tests/test_server.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ async def test_edit_contents_handler_missing_hash(tmp_path):
367367
]
368368
}
369369

370-
# file_hashが欠けている場合は例外が発生することを確認
371370
with pytest.raises(RuntimeError) as exc_info:
372371
await edit_contents_handler.run_tool(edit_args)
373372
assert "Missing required field: file_hash" in str(exc_info.value)
@@ -455,16 +454,13 @@ async def test_edit_contents_handler_multiple_patches(tmp_path):
455454
]
456455
}
457456

458-
# 編集を適用
459457
result = await edit_contents_handler.run_tool(edit_args)
460458

461-
# 結果の検証
462459
assert len(result) == 1
463460
edit_results = json.loads(result[0].text)
464461
assert file_path in edit_results
465462
assert edit_results[file_path]["result"] == "ok"
466463

467-
# ファイルの内容を確認
468464
with open(file_path) as f:
469465
content = f.read()
470466
assert "Modified Line 2" in content
@@ -523,7 +519,6 @@ async def test_edit_contents_relative_path():
523519
async def test_edit_contents_absolute_path():
524520
handler = EditTextFileContentsHandler()
525521
abs_path = str(Path("/absolute/path/file.txt").absolute())
526-
# モックを使用して実際のファイル操作を避ける
527522
handler.editor.edit_file_contents = lambda *args, **kwargs: {"result": "success"}
528523

529524
result = await handler.run_tool(

0 commit comments

Comments
 (0)