5
5
from multiprocessing import Queue , cpu_count
6
6
import unittest
7
7
import warnings
8
+ import sys
8
9
9
10
from hypothesis import given , example , settings
10
11
from hypothesis .strategies import integers , floats
@@ -189,6 +190,8 @@ def test_progress_bar_play(self):
189
190
self .assertIsInstance (results , axelrod .ResultSet )
190
191
self .assertEqual (tournament .progress_bar .total , 15 )
191
192
193
+ @unittest .skipIf (sys .platform .startswith ("win" ),
194
+ "Parallel processing not supported on Windows" )
192
195
def test_progress_bar_play_parallel (self ):
193
196
"""Test that tournament plays when asking for progress bar for parallel
194
197
tournament"""
@@ -234,6 +237,8 @@ def test_property_serial_play(self, tournament):
234
237
self .assertEqual (results .nplayers , len (tournament .players ))
235
238
self .assertEqual (results .players , [str (p ) for p in tournament .players ])
236
239
240
+ @unittest .skipIf (sys .platform .startswith ("win" ),
241
+ "Parallel processing not supported on Windows" )
237
242
def test_parallel_play (self ):
238
243
# Test that we get an instance of ResultSet
239
244
tournament = axelrod .Tournament (
@@ -274,6 +279,8 @@ def test_run_serial(self):
274
279
calls = tournament ._write_interactions .call_args_list
275
280
self .assertEqual (len (calls ), 15 )
276
281
282
+ @unittest .skipIf (sys .platform .startswith ("win" ),
283
+ "Parallel processing not supported on Windows" )
277
284
def test_run_parallel (self ):
278
285
tournament = axelrod .Tournament (
279
286
name = self .test_name ,
@@ -289,6 +296,8 @@ def test_run_parallel(self):
289
296
calls = tournament ._write_interactions .call_args_list
290
297
self .assertEqual (len (calls ), 15 )
291
298
299
+ @unittest .skipIf (sys .platform .startswith ("win" ),
300
+ "Parallel processing not supported on Windows" )
292
301
def test_n_workers (self ):
293
302
max_processes = cpu_count ()
294
303
@@ -309,6 +318,8 @@ def test_n_workers(self):
309
318
self .assertEqual (tournament ._n_workers (processes = max_processes + 2 ),
310
319
max_processes )
311
320
321
+ @unittest .skipIf (sys .platform .startswith ("win" ),
322
+ "Parallel processing not supported on Windows" )
312
323
@unittest .skipIf (
313
324
cpu_count () < 2 ,
314
325
"not supported on single processor machines" )
@@ -324,6 +335,8 @@ def test_2_workers(self):
324
335
repetitions = self .test_repetitions ,)
325
336
self .assertEqual (tournament ._n_workers (processes = 2 ), 2 )
326
337
338
+ @unittest .skipIf (sys .platform .startswith ("win" ),
339
+ "Parallel processing not supported on Windows" )
327
340
def test_start_workers (self ):
328
341
workers = 2
329
342
work_queue = Queue ()
@@ -346,6 +359,8 @@ def test_start_workers(self):
346
359
stops += 1
347
360
self .assertEqual (stops , workers )
348
361
362
+ @unittest .skipIf (sys .platform .startswith ("win" ),
363
+ "Parallel processing not supported on Windows" )
349
364
def test_worker (self ):
350
365
tournament = axelrod .Tournament (
351
366
name = self .test_name ,
0 commit comments