Skip to content

Commit 974faef

Browse files
committed
Fix deterministic and stochastic tournament tests to ensure consistent results
1 parent b83e4d4 commit 974faef

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

axelrod/tests/integration/test_tournament.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,14 @@ def test_repeat_tournament_deterministic(self):
9797
turns=2,
9898
repetitions=2,
9999
)
100-
path = pathlib.Path(
101-
"test_outputs/stochastic_tournament_{}.csv".format(_)
102-
)
100+
# path = pathlib.Path(
101+
# "test_outputs/stochastic_tournament_{}.csv".format(_)
102+
# )
103+
# MG: Changed to use right filename "deterministic_tournament_{}.csv"
104+
path = pathlib.Path(f"test_outputs/deterministic_tournament_{_}.csv")
105+
# MG: Control for file existence before new execution
106+
if path.exists():
107+
path.unlink()
103108
files.append(axl_filename(path))
104109
tournament.play(
105110
progress_bar=False, filename=files[-1], build_results=False

0 commit comments

Comments
 (0)