def test_ability_attack(): # Test for correct attack value test_runs = 400 big_strength = Ability("Overwhelming Strength", 400) for _ in range(0, test_runs): attack = big_strength.attack() assert attack >= 0 and attack <= 400
def test_hero_attack_weapon(): big_strength = Ability("Overwhelming Strength", 200) Athena = Hero("Athena") Athena.add_ability(big_strength) test_runs = 100 for _ in range(0, test_runs): attack = big_strength.attack() assert attack <= 200 and attack >= 0