Skip to content

Commit 0c34fbc

Browse files
committed
Remove attrs in test_responses
These lines are no longer hit by any test, this takes the coverage up to 100%. Further refactoring can take place following all the PRs for #844 are merged.
1 parent dfc005c commit 0c34fbc

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

axelrod/tests/strategies/test_player.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def test_init_kwargs(self):
337337

338338

339339
def test_responses(test_class, player1, player2, responses, history1=None,
340-
history2=None, seed=None, attrs=None):
340+
history2=None, seed=None):
341341
"""
342342
Test responses to arbitrary histories. Used for the following tests
343343
in TestPlayer: first_play_test, second_play_test, and responses_test.
@@ -359,9 +359,6 @@ def test_responses(test_class, player1, player2, responses, history1=None,
359359
for response in responses:
360360
s1, s2 = simulate_play(player1, player2)
361361
test_class.assertEqual(s1, response)
362-
if attrs:
363-
for attr, value in attrs.items():
364-
test_class.assertEqual(getattr(player1, attr), value)
365362

366363

367364
class TestOpponent(Player):
@@ -541,7 +538,6 @@ def versus_test(self, opponent, expected_actions,
541538

542539
def responses_test(self, responses, player_history=None,
543540
opponent_history=None, seed=None, length=200,
544-
attrs=None,
545541
init_args=None, init_kwargs=None):
546542
"""Test responses to arbitrary histories. A match is played where the
547543
histories are enforced and the sequence of plays in responses is
@@ -576,19 +572,19 @@ def responses_test(self, responses, player_history=None,
576572
player2 = MockPlayer()
577573
player2.set_match_attributes(length=length)
578574
test_responses(self, player1, player2, responses, player_history,
579-
opponent_history, seed=seed, attrs=attrs)
575+
opponent_history, seed=seed)
580576

581577
# Test that we get the same sequence after a reset
582578
player1.reset()
583579
player2.reset()
584580
test_responses(self, player1, player2, responses, player_history,
585-
opponent_history, seed=seed, attrs=attrs)
581+
opponent_history, seed=seed)
586582

587583
# Test that we get the same sequence after a clone
588584
player1 = player1.clone()
589585
player2 = player2.clone()
590586
test_responses(self, player1, player2, responses, player_history,
591-
opponent_history, seed=seed, attrs=attrs)
587+
opponent_history, seed=seed)
592588

593589
def classifier_test(self, expected_class_classifier=None):
594590
"""Test that the keys in the expected_classifier dictionary give the

0 commit comments

Comments
 (0)