Test executing a group without specifying a subcommand.
(self)
| 261 | |
| 262 | @pytest.mark.asyncio |
| 263 | async def test_group_execute_no_subcommand(self): |
| 264 | """Test executing a group without specifying a subcommand.""" |
| 265 | group = DummyCommandGroup() |
| 266 | |
| 267 | cmd1 = DummyCommand(name="sub1", description="Subcommand 1") |
| 268 | cmd2 = DummyCommand(name="sub2", description="Subcommand 2") |
| 269 | |
| 270 | group.add_subcommand(cmd1) |
| 271 | group.add_subcommand(cmd2) |
| 272 | |
| 273 | result = await group.execute() |
| 274 | |
| 275 | assert result.success is True |
| 276 | assert "Available test_group commands" in result.output |
| 277 | assert "sub1: Subcommand 1" in result.output |
| 278 | assert "sub2: Subcommand 2" in result.output |
| 279 | |
| 280 | @pytest.mark.asyncio |
| 281 | async def test_group_execute_with_subcommand(self): |
nothing calls this directly
no test coverage detected