diff --git a/pycrostates/io/tests/test_fiff.py b/pycrostates/io/tests/test_fiff.py index c443a8d7..0f406d91 100644 --- a/pycrostates/io/tests/test_fiff.py +++ b/pycrostates/io/tests/test_fiff.py @@ -290,28 +290,28 @@ def test_prepare_kwargs(): _prepare_kwargs("ModKMeans", kwargs) # remove one value - kwargs = dict(max_iter=ModK._max_iter, tol=ModK._tol, GEV_=ModK._GEV_) + kwargs = dict(max_iter=ModK._max_iter, tol=ModK._tol, GEV_=ModK._GEV_, ignore_polarity=False) with pytest.raises(ValueError, match="Wrong kwargs provided for"): _prepare_kwargs("ModKMeans", kwargs) def test_prepare_kwargs_ModKMeans(): """Test invalid key/values for ModKMeans.""" - kwargs = dict(n_init=-101, max_iter=ModK._max_iter, tol=ModK._tol, GEV_=ModK._GEV_) + kwargs = dict(n_init=-101, max_iter=ModK._max_iter, tol=ModK._tol, GEV_=ModK._GEV_, ignore_polarity=False) with pytest.raises(ValueError, match="initialization must be a positive integer"): _prepare_kwargs("ModKMeans", kwargs) - kwargs = dict(n_init=ModK._n_init, max_iter=-101, tol=ModK._tol, GEV_=ModK._GEV_) + kwargs = dict(n_init=ModK._n_init, max_iter=-101, tol=ModK._tol, GEV_=ModK._GEV_, ignore_polarity=False) with pytest.raises(ValueError, match="max iteration must be a positive"): _prepare_kwargs("ModKMeans", kwargs) kwargs = dict( n_init=ModK._n_init, max_iter=ModK.max_iter, tol=-101, GEV_=ModK._GEV_ ) - with pytest.raises(ValueError, match="tolerance must be a positive number"): + with pytest.raises(ValueError, match="tolerance must be a positive number", ignore_polarity=False): _prepare_kwargs("ModKMeans", kwargs) - kwargs = dict(n_init=ModK.n_init, max_iter=ModK.max_iter, tol=ModK.tol, GEV_=101) + kwargs = dict(n_init=ModK.n_init, max_iter=ModK.max_iter, tol=ModK.tol, GEV_=101, ignore_polarity=False) with pytest.raises( ValueError, match="'GEV_' should be a percentage between 0 and 1" ):