@@ -308,7 +308,7 @@ def test_linear_regression_results(strategy: str) -> None:
308308
309309
310310@pytest .mark .parametrize ("strategy" , [* STRATEGIES ])
311- def test_results_for_same_alpha (strategy : str , alpha : Any ) -> None :
311+ def test_results_for_same_alpha (strategy : str ) -> None :
312312 """Test that predictions and intervals are similar with two equal values of alpha."""
313313 mapie = MapieRegressor (alpha = [0.1 , 0.1 ], ** STRATEGIES [strategy ])
314314 mapie .fit (X_reg , y_reg )
@@ -341,6 +341,8 @@ def test_results_for_alpha_as_float_and_arraylike(strategy: str, alpha: Any) ->
341341 np .testing .assert_almost_equal (y_preds_float1 [:, :, 0 ], y_preds_array [:, :, 0 ], 7 )
342342 np .testing .assert_almost_equal (y_preds_float2 [:, :, 0 ], y_preds_array [:, :, 1 ], 7 )
343343
344+
345+ @pytest .mark .parametrize ("strategy" , [* STRATEGIES ])
344346def test_results_single_and_multi_jobs (strategy : str ) -> None :
345347 """
346348 Test that MapieRegressor gives equal predictions regardless of number of parallel jobs.
@@ -349,8 +351,6 @@ def test_results_single_and_multi_jobs(strategy: str) -> None:
349351 mapie_single .fit (X_toy , y_toy )
350352 mapie_multi = MapieRegressor (n_jobs = - 1 , ** STRATEGIES [strategy ])
351353 mapie_multi .fit (X_toy , y_toy )
352- y_pred_single , y_low_single , y_up_single = mapie_single .predict (X_toy ).T
353- y_pred_multi , y_low_multi , y_up_multi = mapie_multi .predict (X_toy ).T
354- np .testing .assert_almost_equal (y_pred_single , y_pred_multi )
355- np .testing .assert_almost_equal (y_low_single , y_low_multi )
356- np .testing .assert_almost_equal (y_up_single , y_up_multi )
354+ y_preds_single = mapie_single .predict (X_toy )
355+ y_preds_multi = mapie_multi .predict (X_toy )
356+ np .testing .assert_almost_equal (y_preds_single , y_preds_multi , 7 )
0 commit comments