当前位置: 首页>>代码示例>>Python>>正文


Python Move.get方法代码示例

本文整理汇总了Python中models.Move.get方法的典型用法代码示例。如果您正苦于以下问题:Python Move.get方法的具体用法?Python Move.get怎么用?Python Move.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.Move的用法示例。


在下文中一共展示了Move.get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_moves_2

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
 def test_moves_2(self):
     move = Move.get("Pound")
     p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
     self.assertEqual(p["MOVE_ID"], 1)
     self.assertEqual(p["MOVE_NAME"], "Pound")
     self.assertEqual(p["MOVE_POWER"], 40)
     self.assertEqual(p["MOVE_ACCURACY"], 100)
     self.assertEqual(p["MOVE_PP"], 35)
开发者ID:RobinsonNguyen,项目名称:cs373-idb,代码行数:10,代码来源:tests.py

示例2: test_moves_4

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
 def test_moves_4(self):
     move = Move.get("Water-pulse")
     p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
     self.assertEqual(p["MOVE_ID"], 352)
     self.assertEqual(p["MOVE_NAME"], "Water-pulse")
     self.assertEqual(p["MOVE_TYPE"], "Water")
     self.assertEqual(p["MOVE_CATEGORY"], "Special")
     self.assertEqual(p["MOVE_POWER"], 60)
     self.assertEqual(p["MOVE_ACCURACY"], 100)
     self.assertEqual(p["MOVE_PP"], 20)
     self.assertEqual(p["MOVE_DESCRIPTION"], "Inflicts regular damage.  Has a 20% chance to confuse the target.")
开发者ID:RobinsonNguyen,项目名称:cs373-idb,代码行数:13,代码来源:tests.py

示例3: test_moves_6

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
 def test_moves_6(self):
     move = Move.get("Psychic")
     p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
     self.assertEqual(p["MOVE_ID"], 94)
     self.assertEqual(p["MOVE_NAME"], "Psychic")
     self.assertEqual(p["MOVE_TYPE"], "Psychic")
     self.assertEqual(p["MOVE_CATEGORY"], "Special")
     self.assertEqual(p["MOVE_POWER"], 90)
     self.assertEqual(p["MOVE_ACCURACY"], 100)
     self.assertEqual(p["MOVE_PP"], 10)
     self.assertEqual(
         p["MOVE_DESCRIPTION"],
         "Inflicts regular damage.  Has a 10% chance to lower the target's Special Defense by one stage.",
     )
开发者ID:RobinsonNguyen,项目名称:cs373-idb,代码行数:16,代码来源:tests.py

示例4: test_moves_5

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import get [as 别名]
 def test_moves_5(self):
     move = Move.get("Aurora-beam")
     p = {c.name: getattr(move, c.name) for c in move.__table__.columns}
     self.assertEqual(p["MOVE_ID"], 62)
     self.assertEqual(p["MOVE_NAME"], "Aurora-beam")
     self.assertEqual(p["MOVE_TYPE"], "Ice")
     self.assertEqual(p["MOVE_CATEGORY"], "Special")
     self.assertEqual(p["MOVE_POWER"], 65)
     self.assertEqual(p["MOVE_ACCURACY"], 100)
     self.assertEqual(p["MOVE_PP"], 20)
     self.assertEqual(
         p["MOVE_DESCRIPTION"],
         "Inflicts regular damage.  Has a 10% chance to lower the target's Attack by one stage.",
     )
开发者ID:RobinsonNguyen,项目名称:cs373-idb,代码行数:16,代码来源:tests.py


注:本文中的models.Move.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。