本文整理汇总了Python中monster.Monster.victory_points方法的典型用法代码示例。如果您正苦于以下问题:Python Monster.victory_points方法的具体用法?Python Monster.victory_points怎么用?Python Monster.victory_points使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类monster.Monster
的用法示例。
在下文中一共展示了Monster.victory_points方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_reset
# 需要导入模块: from monster import Monster [as 别名]
# 或者: from monster.Monster import victory_points [as 别名]
def test_reset(self):
"""Set status to "Oops", health to -200 and victory_points to 90 on
a Monster class object, new_monster. Call reset() then check that
new_monster's status, health and victory_points attributes were
restored to their initial values."""
new_monster = Monster("Cookie")
new_monster.status = "Oops"
new_monster.health = -200
new_monster.victory_points = 90
new_monster.reset()
self.assertEqual(new_monster.status, "Out of Tokyo")
self.assertEqual(new_monster.health, 10)
self.assertEqual(new_monster.victory_points, 0)
del new_monster