Skip to content

Commit f55bb0e

Browse files
committed
Remove responses_test
1 parent 40a99de commit f55bb0e

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

axelrod/tests/strategies/test_player.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -529,56 +529,6 @@ def versus_test(self, opponent, expected_actions,
529529
for attr, value in attrs.items():
530530
self.assertEqual(getattr(player, attr), value)
531531

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-
582532
def classifier_test(self, expected_class_classifier=None):
583533
"""Test that the keys in the expected_classifier dictionary give the
584534
expected values in the player classifier dictionary. Also checks that

0 commit comments

Comments
 (0)