Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Skipping py_island test for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Nowak committed May 7, 2015
1 parent 668f301 commit eff2266
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion PyGMO/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_pickle(self):
# This class will stress the island and archipelago classes with highly
# concurrent simple evolutions.


import platform
class _island_torture_test(_ut.TestCase):

def __test_impl(self, isl_type, algo, prob):
Expand All @@ -73,7 +73,13 @@ def test_local_island(self):
for prob in prob_list:
self.__test_impl(isl_type, algo, prob)

@_ut.skipIf(platform.system() == "Windows", "The py_island test cannot be run on Windows")
def test_py_island(self):
# This test creates an infinite import loop on Windows when creating a new process
# with Python multiprocessing module.
# Normal usage of py_island on Windows is possible by using the `if __name__ == "__main__":` guard
# Reference: http://stackoverflow.com/questions/20222534/python-multiprocessing-on-windows-if-name-main

from PyGMO import py_island, algorithm, problem
isl_type = py_island
algo_list = [algorithm.py_example(1), algorithm.de(5)]
Expand Down

0 comments on commit eff2266

Please sign in to comment.