當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。