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 15
15
from hypothesis .strategies import integers , floats
16
16
from tqdm import tqdm
17
17
import numpy as np
18
+ import pandas as pd
18
19
19
20
from axelrod .tests .property import (tournaments ,
20
21
prob_end_tournaments ,
@@ -685,9 +686,9 @@ def test_write_to_csv_with_results(self):
685
686
turns = 2 ,
686
687
repetitions = 2 )
687
688
tournament .play (filename = self .filename , progress_bar = False )
688
- self . assertTrue ( filecmp . cmp ( self .filename ,
689
- "test_outputs/expected_test_tournament.csv" ,
690
- shallow = False ))
689
+ df = pd . read_csv ( self .filename )
690
+ expected_df = pd . read_csv ( "test_outputs/expected_test_tournament.csv" )
691
+ self . assertTrue ( df . equals ( expected_df ))
691
692
692
693
def test_write_to_csv_without_results (self ):
693
694
tournament = axelrod .Tournament (
@@ -698,9 +699,9 @@ def test_write_to_csv_without_results(self):
698
699
repetitions = 2 )
699
700
tournament .play (filename = self .filename , progress_bar = False ,
700
701
build_results = False )
701
- self . assertTrue ( filecmp . cmp ( self .filename ,
702
- "test_outputs/expected_test_tournament_no_results.csv" ,
703
- shallow = False ))
702
+ df = pd . read_csv ( self .filename )
703
+ expected_df = pd . read_csv ( "test_outputs/expected_test_tournament_no_results.csv" )
704
+ self . assertTrue ( df . equals ( expected_df ))
704
705
705
706
706
707
class TestProbEndTournament (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments