Skip to content

Commit b9c0b35

Browse files
authored
Minor changes per PR request feedback.
1 parent 15cb4a2 commit b9c0b35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

axelrod/tests/strategies/test_axelrod_second.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -742,10 +742,10 @@ def test_strategy(self):
742742
actions = [(C, D), (D, C)] + [(C, C)] * 34 + [(D, C)]
743743
# Two cooperations scheduled after the 37-turn defection
744744
actions += [(C, C)] * 2
745-
# TFT twice, then low-random # yields a DCC combo.
745+
# TFT twice, then random number yields a DCC combo.
746746
actions += [(C, C)] * 2
747747
actions += [(D, C), (C, C), (C, C)]
748-
# Don't draw next random # until now. Again DCC.
748+
# Don't draw next random number until now. Again DCC.
749749
actions += [(D, C), (C, C), (C, C)]
750750
self.versus_test(Defect1, expected_actions=actions, seed=2)
751751

@@ -803,7 +803,7 @@ def test_strategy(self):
803803
actions += [(D, C), (C, D), (D, C), (C, D), (C, C)]
804804
# This is the seventh time we've hit the limit. So do it once more.
805805
actions += [(C, D), (D, C), (C, D), (D, C), (C, D), (C, C)]
806-
# Now hit thi limit sooner
806+
# Now hit the limit sooner
807807
actions += [(C, D), (D, C), (C, D), (C, C)] * 5
808808
self.versus_test(AsyncAlternator, expected_actions=actions, attrs={"parity_limit": 3})
809809

@@ -835,7 +835,7 @@ def test_strategy(self):
835835
# The history matrix will be [[0, 2], [5, 6], [3, 6], [4, 2]]
836836
actions = match.play()
837837
self.assertEqual(actions, expected_actions) # Just to be consistant with the current test.
838-
self.assertEqual(round(player.calculate_chi_squared(len(expected_actions)),3), 2.395)
838+
self.assertAlmostEqual(player.calculate_chi_squared(len(expected_actions)), 2.395, places=4)
839839

840840
# Come back out of defect mode
841841
opponent_actions = [D, C, D, C, D, D, D, C, D, C, C, D, D, C, D, D, C,
@@ -852,5 +852,5 @@ def test_strategy(self):
852852
actions += [(D, D)] * 14
853853
# Mutual defect for a while, then exit Defect mode with two coops
854854
actions += [(C, D)] * 2
855-
self.versus_test(Rand_Then_Def, expected_actions=actions, seed=10, \
855+
self.versus_test(Rand_Then_Def, expected_actions=actions, seed=10,
856856
attrs={"mode": "Normal", "was_defective": True})

0 commit comments

Comments
 (0)