@@ -529,56 +529,6 @@ def versus_test(self, opponent, expected_actions,
529
529
for attr , value in attrs .items ():
530
530
self .assertEqual (getattr (player , attr ), value )
531
531
532
- def responses_test (self , responses , player_history = None ,
533
- opponent_history = None , seed = None , length = 200 ,
534
- init_args = None , init_kwargs = None ):
535
- """Test responses to arbitrary histories. A match is played where the
536
- histories are enforced and the sequence of plays in responses is
537
- checked to be the outcome. Internal variables can be checked with the
538
- attrs attribute and arguments to the first player can be passed in
539
- init_args.
540
-
541
- Parameters
542
- ----------
543
- responses: History or sequence of axelrod.Actions
544
- The expected outcomes
545
- player_history, opponent_history: sequences of prior history to enforce
546
- seed: int
547
- A random seed if needed for reproducibility
548
- length: int
549
- Some players require the length of the match
550
- attrs: dict
551
- dictionary of internal attributes to check at the end of all plays
552
- in player
553
- init_args: tuple or list
554
- A list of arguments to instantiate player with
555
- init_kwargs: dictionary
556
- A list of keyword arguments to instantiate player with
557
- """
558
- if init_args is None :
559
- init_args = ()
560
- if init_kwargs is None :
561
- init_kwargs = dict ()
562
-
563
- player1 = self .player (* init_args , ** init_kwargs )
564
- player1 .set_match_attributes (length = length )
565
- player2 = MockPlayer ()
566
- player2 .set_match_attributes (length = length )
567
- test_responses (self , player1 , player2 , responses , player_history ,
568
- opponent_history , seed = seed )
569
-
570
- # Test that we get the same sequence after a reset
571
- player1 .reset ()
572
- player2 .reset ()
573
- test_responses (self , player1 , player2 , responses , player_history ,
574
- opponent_history , seed = seed )
575
-
576
- # Test that we get the same sequence after a clone
577
- player1 = player1 .clone ()
578
- player2 = player2 .clone ()
579
- test_responses (self , player1 , player2 , responses , player_history ,
580
- opponent_history , seed = seed )
581
-
582
532
def classifier_test (self , expected_class_classifier = None ):
583
533
"""Test that the keys in the expected_classifier dictionary give the
584
534
expected values in the player classifier dictionary. Also checks that
0 commit comments