Skip to content

Commit 3db1eac

Browse files
committed
Remove unneeded method overwrite.
1 parent 0f34d20 commit 3db1eac

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

axelrod/tests/strategies/test_calculator.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ def test_edge_case_calculator_ignores_cycles_gt_len_ten(self):
8181
axelrod.MockPlayer(actions=opponent_actions),
8282
expected_actions=uses_tit_for_tat_after_twenty_rounds, seed=seed)
8383

84-
def attribute_equality_test(self, player, clone):
85-
"""Overwrite the default test to check Joss instance"""
86-
self.assertIsInstance(player.joss_instance, axelrod.Joss)
87-
self.assertIsInstance(clone.joss_instance, axelrod.Joss)
88-
8984
def test_get_joss_strategy_actions(self):
9085
opponent = [C, D, D, C, C]
9186

axelrod/tests/strategies/test_memorytwo.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,3 @@ def test_strategy(self):
4141
# ALLD forever if all D twice
4242
self.responses_test([D] * 10, [C, D, D, D, D, D], [D, D, D, D, D, D])
4343
self.responses_test([D] * 9, [C] + [D] * 5 + [C] * 4, [D] * 6 + [C] * 4)
44-
45-
def attribute_equality_test(self, player, clone):
46-
"""Overwrite specific test to be able to test self.players"""
47-
for p in [player, clone]:
48-
self.assertEqual(p.play_as, "TFT")
49-
self.assertEqual(p.shift_counter, 3)
50-
self.assertEqual(p.alld_counter, 0)
51-
52-
for key, value in [("TFT", axelrod.TitForTat),
53-
("TFTT", axelrod.TitFor2Tats),
54-
("ALLD", axelrod.Defector)]:
55-
self.assertEqual(p.players[key].history, [])
56-
self.assertIsInstance(p.players[key], value)

axelrod/tests/strategies/test_meta.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,6 @@ def classifier_test(self, expected_class_classifier=None):
4646
msg="%s - Behaviour: %s != Expected Behaviour: %s" %
4747
(key, player.classifier[key], classifier[key]))
4848

49-
def attribute_equality_test(self, player, clone):
50-
"""Overwriting this specific method to check team."""
51-
for p1, p2 in zip(player.team, clone.team):
52-
self.assertEqual(len(p1.history), 0)
53-
self.assertEqual(len(p2.history), 0)
54-
55-
team_player_names = [p.__repr__() for p in player.team]
56-
team_clone_names = [p.__repr__() for p in clone.team]
57-
self.assertEqual(team_player_names, team_clone_names)
58-
5949
def test_repr(self):
6050
player = self.player()
6151
team_size = len(player.team)

0 commit comments

Comments
 (0)