3434@pytest .mark .parametrize ("min_count" , [None , 1 , 3 ])
3535@pytest .mark .parametrize ("add_nan" , [True , False ])
3636@pytest .mark .parametrize ("skipna" , [True , False ])
37- def test_xarray_reduce (skipna , add_nan , min_count , engine_no_numba , reindex ):
38- engine = engine_no_numba
37+ def test_xarray_reduce (skipna , add_nan , min_count , engine , reindex ):
3938 if skipna is False and min_count is not None :
4039 pytest .skip ()
4140
@@ -91,11 +90,9 @@ def test_xarray_reduce(skipna, add_nan, min_count, engine_no_numba, reindex):
9190# TODO: sort
9291@pytest .mark .parametrize ("pass_expected_groups" , [True , False ])
9392@pytest .mark .parametrize ("chunk" , (pytest .param (True , marks = requires_dask ), False ))
94- def test_xarray_reduce_multiple_groupers (pass_expected_groups , chunk , engine_no_numba ):
93+ def test_xarray_reduce_multiple_groupers (pass_expected_groups , chunk , engine ):
9594 if chunk and pass_expected_groups is False :
9695 pytest .skip ()
97- engine = engine_no_numba
98-
9996 arr = np .ones ((4 , 12 ))
10097 labels = np .array (["a" , "a" , "c" , "c" , "c" , "b" , "b" , "c" , "c" , "b" , "b" , "f" ])
10198 labels2 = np .array ([1 , 2 , 2 , 1 ])
@@ -140,10 +137,9 @@ def test_xarray_reduce_multiple_groupers(pass_expected_groups, chunk, engine_no_
140137
141138@pytest .mark .parametrize ("pass_expected_groups" , [True , False ])
142139@pytest .mark .parametrize ("chunk" , (pytest .param (True , marks = requires_dask ), False ))
143- def test_xarray_reduce_multiple_groupers_2 (pass_expected_groups , chunk , engine_no_numba ):
140+ def test_xarray_reduce_multiple_groupers_2 (pass_expected_groups , chunk , engine ):
144141 if chunk and pass_expected_groups is False :
145142 pytest .skip ()
146- engine = engine_no_numba
147143
148144 arr = np .ones ((2 , 12 ))
149145 labels = np .array (["a" , "a" , "c" , "c" , "c" , "b" , "b" , "c" , "c" , "b" , "b" , "f" ])
@@ -218,8 +214,7 @@ def test_xarray_reduce_cftime_var(engine, indexer, expected_groups, func):
218214
219215@requires_cftime
220216@requires_dask
221- def test_xarray_reduce_single_grouper (engine_no_numba ):
222- engine = engine_no_numba
217+ def test_xarray_reduce_single_grouper (engine ):
223218 # DataArray
224219 ds = xr .Dataset (
225220 {
@@ -326,17 +321,15 @@ def test_rechunk_for_blockwise(inchunks, expected):
326321# TODO: dim=None, dim=Ellipsis, groupby unindexed dim
327322
328323
329- def test_groupby_duplicate_coordinate_labels (engine_no_numba ):
330- engine = engine_no_numba
324+ def test_groupby_duplicate_coordinate_labels (engine ):
331325 # fix for http://stackoverflow.com/questions/38065129
332326 array = xr .DataArray ([1 , 2 , 3 ], [("x" , [1 , 1 , 2 ])])
333327 expected = xr .DataArray ([3 , 3 ], [("x" , [1 , 2 ])])
334328 actual = xarray_reduce (array , array .x , func = "sum" , engine = engine )
335329 assert_equal (expected , actual )
336330
337331
338- def test_multi_index_groupby_sum (engine_no_numba ):
339- engine = engine_no_numba
332+ def test_multi_index_groupby_sum (engine ):
340333 # regression test for xarray GH873
341334 ds = xr .Dataset (
342335 {"foo" : (("x" , "y" , "z" ), np .ones ((3 , 4 , 2 )))},
@@ -362,8 +355,7 @@ def test_multi_index_groupby_sum(engine_no_numba):
362355
363356
364357@pytest .mark .parametrize ("chunks" , (None , pytest .param (2 , marks = requires_dask )))
365- def test_xarray_groupby_bins (chunks , engine_no_numba ):
366- engine = engine_no_numba
358+ def test_xarray_groupby_bins (chunks , engine ):
367359 array = xr .DataArray ([1 , 1 , 1 , 1 , 1 ], dims = "x" )
368360 labels = xr .DataArray ([1 , 1.5 , 1.9 , 2 , 3 ], dims = "x" , name = "labels" )
369361
@@ -532,11 +524,10 @@ def test_alignment_error():
532524@pytest .mark .parametrize ("dtype_out" , [np .float64 , "float64" , np .dtype ("float64" )])
533525@pytest .mark .parametrize ("dtype" , [np .float32 , np .float64 ])
534526@pytest .mark .parametrize ("chunk" , (pytest .param (True , marks = requires_dask ), False ))
535- def test_dtype (add_nan , chunk , dtype , dtype_out , engine_no_numba ):
536- if engine_no_numba == "numbagg" :
527+ def test_dtype (add_nan , chunk , dtype , dtype_out , engine ):
528+ if engine == "numbagg" :
537529 # https://github.com/numbagg/numbagg/issues/121
538530 pytest .skip ()
539- engine = engine_no_numba
540531 xp = dask .array if chunk else np
541532 data = xp .linspace (0 , 1 , 48 , dtype = dtype ).reshape ((4 , 12 ))
542533
0 commit comments