Skip to content

Add reg test for k61r/Champion #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/test_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,19 @@ def test_implemented_strategies():
interactions = match.play()
axl_match = Match((axl_player, opponent))
assert interactions == axl_match.play(), (player, opponent)

def test_champion_v_alternator():
"""
Specific regression test for a bug.
"""
player = Player("k61r")
opponent = Alternator()

match = Match((player, opponent))

seed(0)
interactions = match.play()
assert interactions[25:30] == [(C, D), (C, C), (C, D), (D, C), (C, D)]

seed(0)
assert interactions == match.play()