

def test_prev_state_updates(self):
    'Test that the q and v values update.'
    random.seed(5)
    p1 = axelrod.CautiousQLearner()
    p2 = axelrod.Cooperator()
    simulate_play(p1, p2)
    self.assertEqual(p1.prev_state, '0.0')
    simulate_play(p1, p2)
    self.assertEqual(p1.prev_state, 'C1.0')

dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/tests/unit/test_qlearner.py TestCautiousQLearner.test_prev_state_updates/original