Skip to content

Commit 7d20f0f

Browse files
committed
Add reg test for k61r/Champion
This requires Axelrod-Python/TourExec#6 to work but ensures that k61r behaves as it's supposed to. Closes #62
1 parent 2682502 commit 7d20f0f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_player.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,19 @@ def test_implemented_strategies():
129129
interactions = match.play()
130130
axl_match = Match((axl_player, opponent))
131131
assert interactions == axl_match.play(), (player, opponent)
132+
133+
def test_champion_v_alternator():
134+
"""
135+
Specific regression test for a bug.
136+
"""
137+
player = Player("k61r")
138+
opponent = Alternator()
139+
140+
match = Match((player, opponent))
141+
142+
seed(0)
143+
interactions = match.play()
144+
assert interactions[25:30] == [(C, D), (C, C), (C, D), (D, C), (C, D)]
145+
146+
seed(0)
147+
assert interactions == match.play()

0 commit comments

Comments
 (0)