@@ -742,10 +742,10 @@ def test_strategy(self):
742
742
actions = [(C , D ), (D , C )] + [(C , C )] * 34 + [(D , C )]
743
743
# Two cooperations scheduled after the 37-turn defection
744
744
actions += [(C , C )] * 2
745
- # TFT twice, then low- random # yields a DCC combo.
745
+ # TFT twice, then random number yields a DCC combo.
746
746
actions += [(C , C )] * 2
747
747
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.
749
749
actions += [(D , C ), (C , C ), (C , C )]
750
750
self .versus_test (Defect1 , expected_actions = actions , seed = 2 )
751
751
@@ -803,7 +803,7 @@ def test_strategy(self):
803
803
actions += [(D , C ), (C , D ), (D , C ), (C , D ), (C , C )]
804
804
# This is the seventh time we've hit the limit. So do it once more.
805
805
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
807
807
actions += [(C , D ), (D , C ), (C , D ), (C , C )] * 5
808
808
self .versus_test (AsyncAlternator , expected_actions = actions , attrs = {"parity_limit" : 3 })
809
809
@@ -835,7 +835,7 @@ def test_strategy(self):
835
835
# The history matrix will be [[0, 2], [5, 6], [3, 6], [4, 2]]
836
836
actions = match .play ()
837
837
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 .assertEqual (player .calculate_chi_squared (len (expected_actions )), 2.395 , places = 3 )
839
839
840
840
# Come back out of defect mode
841
841
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):
852
852
actions += [(D , D )] * 14
853
853
# Mutual defect for a while, then exit Defect mode with two coops
854
854
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 ,
856
856
attrs = {"mode" : "Normal" , "was_defective" : True })
0 commit comments