MCPcopy Create free account
hub / github.com/bcefghj/miniClaudeCode / test_read_existing_file

Method test_read_existing_file

tests/test_tools.py:67–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 self.tool = FileReadTool()
66
67 def test_read_existing_file(self):
68 with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) as f:
69 f.write("line1\nline2\nline3\n")
70 f.flush()
71 result = self.tool.execute({"path": f.name})
72 self.assertFalse(result.is_error)
73 self.assertIn("line1", result.output)
74 self.assertIn("line2", result.output)
75 Path(f.name).unlink()
76
77 def test_read_nonexistent(self):
78 result = self.tool.execute({"path": "/nonexistent/file.txt"})

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected