Valid JSON should parse correctly.
(self)
| 16 | """Test JSON extraction from LLM output.""" |
| 17 | |
| 18 | def test_valid_json(self): |
| 19 | """Valid JSON should parse correctly.""" |
| 20 | raw = '{"name": "write_file", "args": {"path": "test.py", "content": "hello"}}' |
| 21 | result = extract_json(raw) |
| 22 | assert result is not None |
| 23 | assert result["name"] == "write_file" |
| 24 | assert result["args"]["path"] == "test.py" |
| 25 | |
| 26 | def test_json_with_tool_tag(self): |
| 27 | """JSON inside tool tag should be extracted.""" |
nothing calls this directly
no test coverage detected