File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -754,26 +754,27 @@ def test_write_to_csv_without_results(self):
754
754
def test_seeding_equality (self , seed ):
755
755
"""Tests that a tournament with a given seed will return the
756
756
same results each time."""
757
- players = [axelrod .Random (0.4 ), axelrod .Random (0.6 ), axelrod .Random (0.8 )]
757
+ rng = axelrod .RandomGenerator (seed = seed )
758
+ players = [axelrod .Random (rng .random ()) for _ in range (8 )]
758
759
tournament1 = axelrod .Tournament (
759
760
name = self .test_name ,
760
761
players = players ,
761
762
game = self .game ,
762
763
turns = 3 ,
763
- repetitions = 3 ,
764
+ repetitions = 100 ,
764
765
seed = seed
765
766
)
766
767
tournament2 = axelrod .Tournament (
767
768
name = self .test_name ,
768
769
players = players ,
769
770
game = self .game ,
770
771
turns = 3 ,
771
- repetitions = 3 ,
772
+ repetitions = 100 ,
772
773
seed = seed
773
774
)
774
- results1 = tournament1 .play ()
775
- results2 = tournament2 .play ()
776
- self .assertEqual (results1 .summarise () , results2 .summarise () )
775
+ results1 = tournament1 .play (processes = 2 )
776
+ results2 = tournament2 .play (processes = 2 )
777
+ self .assertEqual (results1 .ranked_names , results2 .ranked_names )
777
778
778
779
def test_seeding_inequality (self ):
779
780
players = [axelrod .Random (0.4 ), axelrod .Random (0.6 )]
You can’t perform that action at this time.
0 commit comments