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


Python test_helpers.TestHelpers类代码示例

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


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


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