Tests _parse_options correctly parses key:value strings.
(self)
| 150 | self.assertEqual(result[2]["name"], "foo") |
| 151 | |
| 152 | def test_parse_options(self): |
| 153 | """ |
| 154 | Tests _parse_options correctly parses key:value strings. |
| 155 | """ |
| 156 | import sys, os |
| 157 | sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
| 158 | from backend import BackendServicer |
| 159 | servicer = BackendServicer() |
| 160 | opts = servicer._parse_options([ |
| 161 | "tool_parser:hermes", |
| 162 | "reasoning_parser:deepseek_r1", |
| 163 | "invalid_no_colon", |
| 164 | "key_with_colons:a:b:c", |
| 165 | ]) |
| 166 | self.assertEqual(opts["tool_parser"], "hermes") |
| 167 | self.assertEqual(opts["reasoning_parser"], "deepseek_r1") |
| 168 | self.assertEqual(opts["key_with_colons"], "a:b:c") |
| 169 | self.assertNotIn("invalid_no_colon", opts) |
| 170 | |
| 171 | def test_apply_engine_args_known_keys(self): |
| 172 | """ |
nothing calls this directly
no test coverage detected