MCPcopy Index your code
hub / github.com/microsoft/SkillOpt / test_bare_json_object

Method test_bare_json_object

tests/test_json_utils.py:20–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 assert extract_json(text) == {"key": "value", "num": 42}
19
20 def test_bare_json_object(self) -> None:
21 text = 'The result is {"answer": "yes", "score": 0.95}.'
22 assert extract_json(text) == {"answer": "yes", "score": 0.95}
23
24 def test_code_fence_takes_precedence(self) -> None:
25 """If fence content parses successfully it should be preferred over bare."""

Callers

nothing calls this directly

Calls 1

extract_jsonFunction · 0.90

Tested by

no test coverage detected