Test model command treats unknown subcommand as model name.
(self)
| 326 | |
| 327 | @pytest.mark.asyncio |
| 328 | async def test_group_model_command_shortcut(self): |
| 329 | """Test model command treats unknown subcommand as model name.""" |
| 330 | |
| 331 | class ModelGroup(CommandGroup): |
| 332 | @property |
| 333 | def name(self) -> str: |
| 334 | return "model" |
| 335 | |
| 336 | @property |
| 337 | def description(self) -> str: |
| 338 | return "Test model group" |
| 339 | |
| 340 | group = ModelGroup() |
| 341 | set_cmd = DummyCommand(name="set", description="Set model") |
| 342 | group.add_subcommand(set_cmd) |
| 343 | |
| 344 | # Pass a model name as if it's a subcommand |
| 345 | result = await group.execute(subcommand="gpt-4") |
| 346 | |
| 347 | assert result.success is True |
| 348 | # The model_name should be passed to kwargs |
| 349 | |
| 350 | @pytest.mark.asyncio |
| 351 | async def test_group_provider_command_shortcut(self): |
nothing calls this directly
no test coverage detected