• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python test_helpers.TestHelpers类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tests.agents.trade.test_helpers.TestHelpers的典型用法代码示例。如果您正苦于以下问题:Python TestHelpers类的具体用法?Python TestHelpers怎么用?Python TestHelpers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: test_buff_target

    def test_buff_target(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 0, BloodfenRaptor(), RiverCrocolisk())
        self.make_all_active(game)
        self.add_minions(game, 0, AbusiveSergeant())

        game.play_single_turn()
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:8,代码来源:trade_agent_tests.py


示例2: test_will_play_three_cards

    def test_will_play_three_cards(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, Wisp(), ArgentSquire(), DireWolfAlpha())
        self.set_mana(game, 0, 3)

        game.play_single_turn()

        self.assert_minions(game.players[0], "Wisp", "Argent Squire", "Dire Wolf Alpha")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:9,代码来源:play_tests.py


示例3: test_will_use_entire_pool

    def test_will_use_entire_pool(self):
        game = TestHelpers().make_game()

        game.players[0].hand = self.make_cards(DireWolfAlpha(), DireWolfAlpha(), DireWolfAlpha(), HarvestGolem())
        game.players[0].mana = 3
        game.players[0].max_mana = 3

        game.play_single_turn()

        self.assert_minions(game.players[0], "Dire Wolf Alpha", "Dire Wolf Alpha")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:10,代码来源:play_tests.py


示例4: test_will_play_multiple_correct_order

    def test_will_play_multiple_correct_order(self):
        game = TestHelpers().make_game()

        game.players[0].hand = self.make_cards(ArgentSquire(), ArgentSquire(), ArgentSquire(), HarvestGolem())
        game.players[0].mana = 3
        game.players[0].max_mana = 3

        game.play_single_turn()

        self.assert_minions(game.players[0], "Harvest Golem", "Argent Squire")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:10,代码来源:play_tests.py


示例5: test_will_play_multiple

    def test_will_play_multiple(self):
        game = TestHelpers().make_game()

        game.players[0].hand = self.make_cards(ArgentSquire(), ArgentSquire(), ArgentSquire())
        game.players[0].mana = 1
        game.players[0].max_mana = 1

        game.play_single_turn()

        self.assert_minions(game.players[0], "Argent Squire", "Argent Squire")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:10,代码来源:play_tests.py


示例6: test_will_play_biggest

    def test_will_play_biggest(self):
        game = TestHelpers().make_game()

        game.players[0].hand = self.make_cards(ArgentSquire(), ArgentSquire(), DireWolfAlpha())
        game.players[0].mana = 1
        game.players[0].max_mana = 1

        game.play_single_turn()

        self.assert_minions(game.players[0], "Dire Wolf Alpha")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:10,代码来源:play_tests.py


示例7: test_wont_kill_self_with_hero_power

    def test_wont_kill_self_with_hero_power(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0)
        self.set_mana(game, 0, 10)
        game.players[0].hero.health = 1

        game.play_single_turn()
        self.assert_minions(game.players[0])
        self.assertEqual(game.players[0].hero.health, 1)
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:10,代码来源:play_tests.py


示例8: test_will_attack_twice

    def test_will_attack_twice(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp(), GoldshireFootman())
        self.add_minions(game, 0, BloodfenRaptor(), RiverCrocolisk())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1])
        self.assert_minions(game.players[0], "Bloodfen Raptor", "River Crocolisk")
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:11,代码来源:attack_tests.py


示例9: test_basic_trade

    def test_basic_trade(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp(), WarGolem())
        self.add_minions(game, 0, BloodfenRaptor())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1], "War Golem")
        self.assert_minions(game.players[0], "Bloodfen Raptor")
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:11,代码来源:trade_agent_tests.py


示例10: test_will_respect_taunt

    def test_will_respect_taunt(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp(), GoldshireFootman())
        self.add_minions(game, 0, BloodfenRaptor())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1], "Wisp")
        self.assert_minions(game.players[0], "Bloodfen Raptor")
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:11,代码来源:attack_tests.py


示例11: test_archer_attacks_enemy

    def test_archer_attacks_enemy(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, ElvenArcher())
        self.set_board(game, 0, Shieldbearer())
        self.set_board(game, 1, BloodfenRaptor())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Shieldbearer", "Elven Archer")
        self.assertEqual(game.players[1].minions[0].health, 1)
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:12,代码来源:attack_tests.py


示例12: test_will_attack_face

    def test_will_attack_face(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 0, BloodfenRaptor())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1])
        self.assert_minions(game.players[0], "Bloodfen Raptor")

        self.assertEqual(27, game.players[1].hero.health)
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:12,代码来源:attack_tests.py


示例13: test_abusive

    def test_abusive(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, AbusiveSergeant())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, RiverCrocolisk())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Abusive Sergeant")
        self.assert_minions(game.players[1])
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:12,代码来源:attack_tests.py


示例14: test_will_use_hero_power_with_empty_hand

    def test_will_use_hero_power_with_empty_hand(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0)
        self.set_mana(game, 0, 10)

        possible = PossiblePlays([], 10)
        play = possible.plays()[0]
        self.assertEqual(play.cards[0].name, "Hero Power")

        game.play_single_turn()
        self.assert_minions(game.players[0], "War Golem")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:12,代码来源:play_tests.py


示例15: test_commando_attacks_enemy

    def test_commando_attacks_enemy(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, StormpikeCommando())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, BloodfenRaptor())
        self.set_mana(game, 0, 5)

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Wisp", "Stormpike Commando")
        self.assert_minions(game.players[1])
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:13,代码来源:attack_tests.py


示例16: test_cleric

    def test_cleric(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, ShatteredSunCleric())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, BloodfenRaptor())
        self.set_mana(game, 0, 3)

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Shattered Sun Cleric")
        self.assert_minions(game.players[1])
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:13,代码来源:attack_tests.py


示例17: test_simple_plays

    def test_simple_plays(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, ArgentSquire(), DireWolfAlpha(), HarvestGolem())

        game.play_single_turn()

        self.assert_minions(game.players[0], "Argent Squire")

        game.play_single_turn()
        game.play_single_turn()

        self.assert_minions(game.players[0], "Argent Squire", "Dire Wolf Alpha")
开发者ID:anuragpapineni,项目名称:Hearthbreaker-evolved-agent,代码行数:13,代码来源:play_tests.py


示例18: test_dwarf

    def test_dwarf(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, DarkIronDwarf())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, RiverCrocolisk())

        game.players[0].mana = 4
        game.players[0].max_mana = 4

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Dark Iron Dwarf")
        self.assert_minions(game.players[1])
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:15,代码来源:attack_tests.py


示例19: test_cleric_buff_to_keep_alive

    def test_cleric_buff_to_keep_alive(self):
        # This test does not pass yet. Agent picks a random friendly minion
        return

        game = TestHelpers().make_game()

        self.set_hand(game, 0, ShatteredSunCleric())
        self.set_board(game, 0, MagmaRager(), Wisp())
        self.set_board(game, 1, ImpMaster())
        self.set_mana(game, 0, 3)

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Shattered Sun Cleric", "Magma Rager", "Wisp")
        self.assert_minions(game.players[1])
开发者ID:5alamander,项目名称:hearthbreaker,代码行数:16,代码来源:attack_tests.py


示例20: setUp

 def setUp(self):
     TestHelpers.fix_create_minion()
     random.seed(1857)
开发者ID:bussiere,项目名称:hearthbreaker,代码行数:3,代码来源:test_case_mixin.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python api.auth_for函数代码示例发布时间:2022-05-27
下一篇:
Python refine.get_events函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap