MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_fenced_json

Method test_fenced_json

tests/test_compiler.py:74–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 assert _parse_json('[{"name": "foo"}]') == [{"name": "foo"}]
73
74 def test_fenced_json(self):
75 text = '```json\n[{"name": "bar"}]\n```'
76 assert _parse_json(text) == [{"name": "bar"}]
77
78 def test_invalid_json(self):
79 with pytest.raises((json.JSONDecodeError, ValueError)):

Callers

nothing calls this directly

Calls 1

_parse_jsonFunction · 0.90

Tested by

no test coverage detected