diff --git a/tests/test_battles.py b/tests/test_battles.py index bdf9e6f..340185b 100644 --- a/tests/test_battles.py +++ b/tests/test_battles.py @@ -35,7 +35,7 @@ async def test_battle_eevee_pikachu_pokes(): async def test_battle_mewtwo_obliterates_eevee(): p = pokefactory.PokeFactory() eevee = p.make_pokemon(133, moves=["tackle", "growl"], level=5) - mewtwo = p.make_pokemon(151, moves=["psychic"], level=100) + mewtwo = p.make_pokemon(150, moves=["psychic"], level=100) team1 = Team([eevee]) team2 = Team([mewtwo]) teams = [team1, team2] @@ -50,3 +50,32 @@ async def test_battle_mewtwo_obliterates_eevee(): mewtwo_wins = res[0][1] eevee_wins = res[0][0] assert mewtwo_wins > eevee_wins + + +@pytest.mark.asyncio() +async def test_battle_eevee_pikachu_formats(): + p = pokefactory.PokeFactory() + eevee = p.make_pokemon(133, moves=["tackle", "growl"], level=5) + pikachu = p.make_pokemon(25, moves=["thundershock", "growl"], level=5) + team1 = Team([eevee]) + team2 = Team([pikachu]) + teams = [team1, team2] + matches = [[0, 1]] + counter = iter(range(10, 20)) + battle_formats = [ + "gen4anythinggoes", + "gen6anythinggoes", + "gen7anythinggoes", + "gen8anythinggoes", + ] + for battle_format in battle_formats: + player_1 = SimpleHeuristicsPlayer( + PlayerConfiguration(f"Player {next(counter)}", None), + battle_format=battle_format, + ) + player_2 = SimpleHeuristicsPlayer( + PlayerConfiguration(f"Player {next(counter)}", None), + battle_format=battle_format, + ) + res = await run_battles(matches, teams, player_1, player_2, battles_per_match=1) + assert res is not None