Skip to content

Commit

Permalink
Add test to cover op_plays == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballs committed Mar 15, 2017
1 parent d833830 commit 9898bd4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions axelrod/tests/strategies/test_lookerup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ def test_strategy(self):
init_kwargs={'parameters': (1, 0, 1)}
)

lookup_table = {
('', '', ''): C,
}
opponent = axelrod.MockPlayer()
actions = [(C, C), (C, C), (C, C), (C, C)]
self.versus_test(
opponent,
expected_actions=actions,
init_kwargs={'lookup_table': lookup_table})

def test_defector_table(self):
"""
Testing a lookup table that always defects if there is enough history.
Expand Down

0 comments on commit 9898bd4

Please sign in to comment.