8000 TST skip `test_k_means_plus_plus_init_2_jobs` on Mac OS X 10.9. See G… · kmike/scikit-learn@61d9c5e · GitHub
[go: up one dir, main page]

Skip to content

Commit 61d9c5e

Browse files
committed
TST skip test_k_means_plus_plus_init_2_jobs on Mac OS X 10.9. See scikit-learnGH-636
1 parent d413229 commit 61d9c5e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

sklearn/cluster/tests/test_k_means.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,14 @@ def test_k_means_new_centers():
195195
np.testing.assert_array_equal(this_labels, labels)
196196

197197

198-
def _is_mac_os_version(version):
199-
"""Returns True iff Mac OS X and newer than specified version."""
198+
def _is_mac_os_version(versions):
199+
"""
200+
Return True if OS is Mac OS X and its major
201+
version is one of the ``versions``.
202+
"""
200203
import platform
201204
mac_version, _, _ = platform.mac_ver()
202-
return mac_version.split('.')[:2] == version.split('.')[:2]
205+
return '.'.join(mac_version.split('.')[:2]) in versions
203206

204207

205208
def _has_blas_lib(libname):
@@ -208,8 +211,8 @@ def _has_blas_lib(libname):
208211

209212

210213
def test_k_means_plus_plus_init_2_jobs():
211-
if _is_mac_os_version('10.7') or _is_mac_os_version('10.8'):
212-
raise SkipTest('Multi-process bug in Mac OS X Lion (see issue #636)')
214+
if _is_mac_os_version(['10.7', '10.8', '10.9']):
215+
raise SkipTest('Multi-process bug in Mac OS X >= 10.7 (see issue #636)')
213216

214217
if _has_blas_lib('openblas'):
215218
raise SkipTest('Multi-process bug with OpenBLAS (see issue #636)')

0 commit comments

Comments
 (0)
0