Skip to content

Commit 4e883c1

Browse files
mojonesmartin
authored andcommitted
added a note about weird lambda in the test file
1 parent 87b101d commit 4e883c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

axelrod/tests/unit/test_lookerup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ def test_effect_of_strategy(self):
3030
self.responses_test([C] * 5, [C, C, C, C, D], [D])
3131

3232
def test_defector_table(self):
33-
"""Testing a lookup table that always defects if there is enough history"""
33+
"""
34+
Testing a lookup table that always defects if there is enough history.
35+
In order for the testing framework to be able to construct new player objects
36+
for the test, self.player needs to be callable with no arguments, thus we
37+
use a lambda expression which will call the constructor with the lookup table
38+
we want.
39+
"""
3440
defector_table = {
3541
('', 'C', 'D') : 'D',
3642
('', 'D', 'D') : 'D',

0 commit comments

Comments
 (0)