Skip to content

Commit b2941f1

Browse files
committed
Minor cleanup
1 parent 16e5fae commit b2941f1

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

axelrod/tests/unit/test_apavlov.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def test_strategy(self):
9090
opponent.history.append(C)
9191
self.assertEqual(player.strategy(opponent), C)
9292

93-
9493
self.responses_test([C, C, C, C, C, D], [C, C, C, C, D, D], [D],
9594
attrs={"opponent_class": "Random"})
9695
self.responses_test([C, D, D, C, C, C], [D, D, C, C, C, C], [D],

axelrod/tests/unit/test_averagecopier.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,14 @@ def test_strategy(self):
2727
self.responses_test([], [], [D], random_seed=2)
2828

2929
def test_when_oppenent_all_Cs(self):
30-
"""
31-
Tests that if opponent has played all C then player chooses C
32-
"""
30+
"""Tests that if opponent has played all C then player chooses C."""
3331
self.responses_test([C, C, C, C], [C, C, C, C], [C, C, C],
3432
random_seed=5)
3533

3634
def test_when_opponent_all_Ds(self):
37-
"""
38-
Tests that if opponent has played all D then player chooses D
39-
"""
40-
self.responses_test([C, C, C, C], [D, D, D, D], [D, D, D], random_seed=5)
35+
"""Tests that if opponent has played all D then player chooses D."""
36+
self.responses_test([C, C, C, C], [D, D, D, D], [D, D, D],
37+
random_seed=5)
4138

4239

4340
class TestNiceAverageCopier(TestPlayer):

axelrod/tests/unit/test_axelrod_first.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ class TestFeld(TestPlayer):
9999
'manipulates_state': False
100100
}
101101

102-
103102
def test_strategy(self):
104103
self.first_play_test(C)
105104
# Test retaliate

axelrod/tests/unit/test_prober.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class TestRemorsefulProber(TestPlayer):
183183
}
184184

185185
def test_strategy(self):
186-
"Randomly defects (probes) and always retaliates like tit for tat."
186+
"""Randomly defects (probes) and always retaliates like tit for tat."""
187187
self.first_play_test(C)
188188

189189
player = self.player(0.4)
@@ -193,21 +193,21 @@ def test_strategy(self):
193193
self.assertEqual(player.strategy(opponent), D)
194194

195195
def test_remorse(self):
196-
"""After probing, if opponent retaliates, will offer a C"""
196+
"""After probing, if opponent retaliates, will offer a C."""
197197
player = self.player(0.4)
198198
opponent = axelrod.Cooperator()
199199

200200
test_responses(self, player, opponent, [C], [C], [C],
201-
random_seed=0, attrs = {'probing': False})
201+
random_seed=0, attrs={'probing': False})
202202

203203
test_responses(self, player, opponent, [C], [C], [D],
204204
random_seed=1, attrs={'probing': True})
205205

206206
test_responses(self, player, opponent, [C, D], [C, D], [D],
207-
attrs = {'probing': False})
207+
attrs={'probing': False})
208208

209209
test_responses(self, player, opponent, [C, D, C], [C, D, D], [D],
210-
attrs = {'probing': False})
210+
attrs={'probing': False})
211211

212212
def test_reduction_to_TFT(self):
213213
player = self.player(0)

0 commit comments

Comments
 (0)