@@ -115,6 +115,7 @@ def test_len(self):
115115 self .assertEqual (len (rr ), len (list (rr .build_match_chunks ())))
116116 self .assertEqual (rr .estimated_size (), len (rr ) * turns * repetitions )
117117
118+
118119class TestProbEndRoundRobin (unittest .TestCase ):
119120
120121 @classmethod
@@ -178,6 +179,7 @@ def test_build_single_match_params(self, prob_end, rm):
178179 self .assertIsInstance (match , axelrod .Match )
179180 self .assertLess (len (match ), float ('inf' ))
180181 self .assertGreater (len (match ), 0 )
182+ self .assertEqual (match .players [0 ].match_attributes ['length' ], float ('inf' ))
181183
182184 # Testing with noise
183185 rr = axelrod .ProbEndRoundRobinMatches (
@@ -200,9 +202,8 @@ def test_build_single_match_params(self, prob_end, rm):
200202
201203 @given (prob_end = floats (min_value = .1 , max_value = 1 ), rm = random_module ())
202204 def test_len (self , prob_end , rm ):
203- turns = 5
204205 repetitions = 10
205- rr = axelrod .ProbEndRoundRobinMatches (self . players , prob_end , game = None ,
206- repetitions = repetitions )
206+ rr = axelrod .ProbEndRoundRobinMatches (
207+ self . players , prob_end , game = None , repetitions = repetitions )
207208 self .assertEqual (len (rr ), len (list (rr .build_match_chunks ())))
208209 self .assertAlmostEqual (rr .estimated_size (), len (rr ) * 1. / prob_end * repetitions )
0 commit comments