本文整理汇总了Python中Test.test_helper.BuildPokemonBattleWrapper.getName方法的典型用法代码示例。如果您正苦于以下问题:Python BuildPokemonBattleWrapper.getName方法的具体用法?Python BuildPokemonBattleWrapper.getName怎么用?Python BuildPokemonBattleWrapper.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test.test_helper.BuildPokemonBattleWrapper
的用法示例。
在下文中一共展示了BuildPokemonBattleWrapper.getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: canBeConfused
# 需要导入模块: from Test.test_helper import BuildPokemonBattleWrapper [as 别名]
# 或者: from Test.test_helper.BuildPokemonBattleWrapper import getName [as 别名]
class canBeConfused(unittest.TestCase):
""" Test that canBeConfused returns the correct default values """
def setUp(self):
""" Builds the ability """
self.name = "Some Name"
self.pkmn = BuildPokemonBattleWrapper()
self.ability = ConfusionImmunityAbility(self.name)
def properReturnValues(self):
""" Check that canBeConfused returns the proper default values """
messages = []
assert not self.ability.canBeConfused(self.pkmn, messages), "Should not be able to be Confused"
assert len(messages) == 1, "Should only have one message"
assert messages[0] == "{0}'s {1} prevented confusion.".format(self.pkmn.getName(), self.name), "Message should have the Pkmn's name and ability's name"