Skip to content

Commit 72ce432

Browse files
committed
Close temporary file
1 parent 927cf0a commit 72ce432

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

axelrod/tests/unit/test_tournament.py

+1-24
Original file line numberDiff line numberDiff line change
@@ -231,28 +231,6 @@ def test_start_workers(self):
231231
stops += 1
232232
self.assertEqual(stops, workers)
233233

234-
#def test_process_done_queue(self):
235-
#workers = 2
236-
#done_queue = Queue()
237-
#interactions = {}
238-
#tournament = axelrod.Tournament(
239-
#name=self.test_name,
240-
#players=self.players,
241-
#game=self.game,
242-
#turns=200,
243-
#repetitions=self.test_repetitions)
244-
#d = {}
245-
#count = 0
246-
#for i, _ in enumerate(self.players):
247-
#for j, _ in enumerate(self.players):
248-
#d[(i, j)] = []
249-
#count += 1
250-
#done_queue.put(d)
251-
#for w in range(workers):
252-
#done_queue.put('STOP')
253-
#tournament._process_done_queue(workers, done_queue)
254-
#self.assertEqual(len(tournament.interactions), count)
255-
256234
def test_worker(self):
257235
tournament = axelrod.Tournament(
258236
name=self.test_name,
@@ -286,8 +264,7 @@ def test_build_result_set(self):
286264
game=self.game,
287265
turns=200,
288266
repetitions=self.test_repetitions)
289-
tournament.play()
290-
results = tournament._build_result_set()
267+
results = tournament.play()
291268
self.assertIsInstance(results, axelrod.ResultSet)
292269

293270
@given(turns=integers(min_value=1, max_value=200))

axelrod/tournament.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _build_result_set(self):
9191
result_set = ResultSetFromFile(
9292
filename=self.filename,
9393
with_morality=self._with_morality)
94-
#self.outputfile.close()
94+
self.outputfile.close()
9595
return result_set
9696

9797
def _run_serial(self):

0 commit comments

Comments
 (0)