@@ -708,8 +708,11 @@ def test_init(self):
708
708
@given (strategies = strategy_lists (strategies = deterministic_strategies ,
709
709
min_size = 2 , max_size = 2 ),
710
710
prob_end = floats (min_value = .1 , max_value = .9 ),
711
+ reps = integers (min_value = 1 , max_value = 3 ),
711
712
seed = integers (min_value = 0 , max_value = 4294967295 ))
712
- def test_complete_tournament (self , strategies , prob_end , seed ):
713
+ @settings (max_examples = 50 , timeout = 0 )
714
+ def test_complete_tournament (self , strategies , prob_end ,
715
+ seed , reps ):
713
716
"""
714
717
A test to check that a spatial tournament on the complete graph
715
718
gives the same results as the round robin.
@@ -720,12 +723,14 @@ def test_complete_tournament(self, strategies, prob_end, seed):
720
723
for j in range (i , len (players ))]
721
724
# create a prob end round robin tournament
722
725
axelrod .seed (seed )
723
- tournament = axelrod .ProbEndTournament (players , prob_end = prob_end )
726
+ tournament = axelrod .ProbEndTournament (players , prob_end = prob_end ,
727
+ repetitions = reps )
724
728
results = tournament .play (progress_bar = False )
725
729
# create a complete spatial tournament
726
730
axelrod .seed (seed )
727
731
spatial_tournament = axelrod .ProbEndSpatialTournament (players ,
728
732
prob_end = prob_end ,
733
+ repetitions = reps ,
729
734
edges = edges )
730
735
spatial_results = spatial_tournament .play (progress_bar = False )
731
736
self .assertEqual (results .match_lengths , spatial_results .match_lengths )
@@ -737,8 +742,10 @@ def test_complete_tournament(self, strategies, prob_end, seed):
737
742
738
743
739
744
@given (tournament = spatial_tournaments (strategies = axelrod .basic_strategies ,
740
- max_turns = 1 ),
745
+ max_turns = 1 , max_noise = 0 ,
746
+ max_repetitions = 3 ),
741
747
seed = integers (min_value = 0 , max_value = 4294967295 ))
748
+ @settings (max_examples = 50 , timeout = 0 )
742
749
def test_one_turn_tournament (self , tournament , seed ):
743
750
"""
744
751
Tests that gives same result as the corresponding spatial round robin
0 commit comments