MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_read_missing_file

Function test_read_missing_file

core/src/tools/builtin/read.rs:170–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168
169 #[tokio::test]
170 async fn test_read_missing_file() {
171 let temp = tempfile::tempdir().unwrap();
172 let tool = ReadTool;
173 let ctx = ToolContext::new(temp.path().to_path_buf());
174 let result = tool
175 .execute(&serde_json::json!({"file_path": "nonexistent.txt"}), &ctx)
176 .await
177 .unwrap();
178
179 assert!(!result.success);
180 }
181
182 #[tokio::test]
183 async fn test_read_missing_param() {

Callers

nothing calls this directly

Calls 2

pathMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected