File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,10 @@ def test_build_result_set(self):
396
396
results = tournament .play (progress_bar = False )
397
397
self .assertIsInstance (results , axelrod .ResultSet )
398
398
399
+ # Test in memory
400
+ results = tournament .play (progress_bar = False , in_memory = True )
401
+ self .assertIsInstance (results , axelrod .ResultSet )
402
+
399
403
def test_no_build_result_set (self ):
400
404
tournament = axelrod .Tournament (
401
405
name = self .test_name ,
@@ -472,6 +476,16 @@ def test_write_interactions(self):
472
476
calls = tournament ._write_interactions .call_args_list
473
477
self .assertEqual (len (calls ), 15 )
474
478
479
+ # Test when runnning in memory
480
+ tournament ._write_interactions = MagicMock (
481
+ name = '_write_interactions' )
482
+ self .assertTrue (tournament .play (filename = self .filename ,
483
+ progress_bar = False ,
484
+ in_memory = True ))
485
+ # Get the calls made to write_interactions
486
+ calls = tournament ._write_interactions .call_args_list
487
+ self .assertEqual (len (calls ), 15 )
488
+
475
489
def test_write_to_csv (self ):
476
490
tournament = axelrod .Tournament (
477
491
name = self .test_name ,
You can’t perform that action at this time.
0 commit comments