()
| 5 | |
| 6 | |
| 7 | def test_parse_array_variants(): |
| 8 | from needle.model.finetune import _parse_array |
| 9 | |
| 10 | assert len(_parse_array('[{"query":"q","answers":[]}]')) == 1 |
| 11 | assert len(_parse_array('Sure!\n[{"query":"q","answers":[]}]\nDone.')) == 1 |
| 12 | assert _parse_array("no array at all") == [] |
| 13 | assert _parse_array("[not valid json]") == [] |
| 14 | |
| 15 | mixed = '[{"query":"q","answers":[]},{"nope":1},{"query":"only"}]' |
| 16 | assert len(_parse_array(mixed)) == 1 |
| 17 | |
| 18 | |
| 19 | def test_collect_tools_dedups_by_name(): |
nothing calls this directly
no test coverage detected