<s> """<STR_LIT>""" <EOL> import random <EOL> import axelrod <EOL> from . test_player import TestPlayer <EOL> C , D = axelrod . Actions . C , axelrod . Actions . D <EOL> class TestCalculator ( TestPlayer ) : <EOL> name = "<STR_LIT>" <EOL> player = axelrod . Calculator <EOL> expected_classifier = { <EOL> '<STR_LIT>' : float ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : set ( ) , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False <EOL> } <EOL> def test_strategy ( self ) : <EOL> self . first_play_test ( C ) <EOL> P1 = axelrod . Calculator ( ) <EOL> P1 . history = [ C ] * <NUM_LIT:20> <EOL> P2 = axelrod . Player ( ) <EOL> P2 . history = [ C , D ] * <NUM_LIT:10> <EOL> self . assertEqual ( D , P1 . strategy ( P2 ) ) <EOL> history = [ C , C , D , C , C , D , C , C , C , D , C , C , C , C , D , C , C , C , C , C ] <EOL> P2 . history = history <EOL> self . assertEqual ( C , P1 . strategy ( P2 ) ) <EOL> self . responses_test ( [ C ] * <NUM_LIT> , [ C ] * <NUM_LIT> , [ D ] ) <EOL> history = [ C , C , D , C , C , D , C , C , C , D , C , C , C , C , D , C , C , C , C , C , D ] <EOL> self . responses_test ( [ C ] * <NUM_LIT> , history , [ D ] ) <EOL> history = [ C , C , D , C , C , D , C , C , C , D , C , C , C , C , D , C , C , C , C , C , D , C ] <EOL> self . responses_test ( [ C ] * <NUM_LIT> , history , [ C ] ) </s>
