Update tests for alias removal

This commit is contained in:
Jared Miller 2026-02-08 13:37:40 -05:00
parent 64b6308bc6
commit 841714d6ca
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
2 changed files with 4 additions and 9 deletions

View file

@ -287,7 +287,7 @@ async def test_direct_handler_passes_move(player, target, punch_right):
@pytest.mark.asyncio
async def test_direct_handler_alias_for_variant(player, target, punch_right):
"""Test alias handler (e.g. pr) works for variant moves."""
"""Test direct handler works for variant moves."""
handler = combat_commands._make_direct_handler(
punch_right, combat_commands.do_attack
)

View file

@ -167,7 +167,6 @@ async def test_commands_detail_simple_combat_move(player, combat_moves):
output = "".join([call[0][0] for call in player.writer.write.call_args_list])
assert "roundhouse" in output
assert "aliases: rh" in output
assert "type: attack" in output
assert "stamina: 8.0" in output
assert "timing window: 2000ms" in output
@ -187,12 +186,10 @@ async def test_commands_detail_variant_base(player, combat_moves):
# Should show both variants
assert "punch left" in output
assert "aliases: pl" in output
assert "{attacker} winds up a left hook!" in output
assert "countered by: dodge right, parry high" in output
assert "punch right" in output
assert "aliases: pr" in output
assert "{attacker} winds up a right hook!" in output
assert "countered by: dodge left, parry high" in output
@ -209,7 +206,6 @@ async def test_commands_detail_specific_variant(player, combat_moves):
output = "".join([call[0][0] for call in player.writer.write.call_args_list])
assert "punch left" in output
assert "aliases: pl" in output
assert "type: attack" in output
assert "stamina: 5.0" in output
assert "timing window: 1800ms" in output
@ -231,12 +227,11 @@ async def test_commands_detail_unknown_command(player):
@pytest.mark.asyncio
async def test_commands_detail_via_alias(player, combat_moves):
"""Test commands detail view via an alias."""
async def test_commands_detail_via_prefix(player, combat_moves):
"""Test commands detail view via prefix matching."""
await commands.dispatch(player, "commands rh")
output = "".join([call[0][0] for call in player.writer.write.call_args_list])
# Should show the full command details, not the alias
# Should show the full command details via prefix match
assert "roundhouse" in output
assert "aliases: rh" in output
assert "type: attack" in output