evennia.contrib.tutorials.evadventure.tests.test_combat

Test EvAdventure combat.

class evennia.contrib.tutorials.evadventure.tests.test_combat.EvAdventureTurnbasedCombatHandlerTest(methodName='runTest')[source]

Bases: evennia.contrib.tutorials.evadventure.tests.mixins.EvAdventureMixin, evennia.utils.test_resources.BaseEvenniaTest

Test methods on the turn-based combat handler.

maxDiff = None
setUp()[source]

Sets up testing environment

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_remove_combatant()[source]
test_start_turn()[source]
test_end_of_turn__empty()[source]
test_add_combatant()[source]
test_start_combat()[source]
test_combat_summary()[source]
test_msg()[source]
test_gain_advantage()[source]
test_gain_disadvantage()[source]
test_flee()[source]
test_unflee()[source]
test_register_and_run_action()[source]
test_get_available_actions()[source]
class evennia.contrib.tutorials.evadventure.tests.test_combat.EvAdventureTurnbasedCombatActionTest(methodName='runTest')[source]

Bases: evennia.contrib.tutorials.evadventure.tests.mixins.EvAdventureMixin, evennia.utils.test_resources.BaseEvenniaTest

Test actions in turn_based combat.

setUp()[source]

Sets up testing environment

test_do_nothing()[source]
test_attack__miss(mock_randint)[source]
test_attack__success__still_alive(mock_randint)[source]
test_attack__success__kill(mock_randint)[source]
test_stunt_fail(mock_randint)[source]
test_stunt_advantage__success(mock_randint)[source]
test_stunt_disadvantage__success(mock_randint)[source]
test_use_item()[source]

Use up a potion during combat.

test_swap_wielded_weapon_or_spell()[source]

First draw a weapon (from empty fists), then swap that out to another weapon, then swap to a spell rune.

test_flee__success()[source]

Test fleeing twice, leading to leaving combat.

test_flee__blocked(mock_randint)[source]