Skip to content

Commit

Permalink
Add a memory test to default FSM test.
Browse files Browse the repository at this point in the history
  • Loading branch information
drvinceknight committed Jan 16, 2019
1 parent b4e6c41 commit 6763610
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions axelrod/tests/strategies/test_finite_state_machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,13 @@ def test_strategy(self):
opponent, expected_actions=actions, init_kwargs={"transitions": transitions}
)

def test_memory(self):
"""
Test the memory depth using implemented algorithm
"""
transitions = self.player().fsm._state_transitions
self.assertEqual(get_memory_from_transitions(transitions), self.expected_classifier["memory_depth"])


class TestFortress3(TestFSMPlayer):

Expand Down

0 comments on commit 6763610

Please sign in to comment.