@@ -108,11 +108,15 @@ def algorithms():
108108 algorithm_information = json .load (f )
109109 algorithms = algorithm_information ["algorithms" ]
110110 for algorithm in algorithms :
111- yield algorithm
112-
113- @pytest .mark .parametrize ("algorithm" , algorithms ())
114- def test_default_bounds_and_initial_guesses (algorithm ):
115- fit = OsipiBase (algorithm = algorithm )
111+ algorithm_dict = algorithm_information .get (algorithm , {})
112+ args = {}
113+ if algorithm_dict .get ("requieres_matlab" , {}) == True :
114+ args ['eng' ] = eng
115+ yield algorithm , args
116+
117+ @pytest .mark .parametrize ("algorithm, args" , algorithms ())
118+ def test_default_bounds_and_initial_guesses (algorithm , args ):
119+ fit = OsipiBase (algorithm = algorithm ,** args )
116120 #assert fit.bounds is not None, f"For {algorithm}, there is no default fit boundary"
117121 #assert fit.initial_guess is not None, f"For {algorithm}, there is no default fit initial guess"
118122 if fit .use_bounds :
@@ -154,6 +158,8 @@ def bound_input():
154158 "strict" : algorithm_dict .get ("xfail_names" , {}).get (name , True )}
155159 kwargs = algorithm_dict .get ("options" , {})
156160 tolerances = algorithm_dict .get ("tolerances" , {})
161+ if algorithm_dict .get ("requieres_matlab" , {}) == True :
162+ kwargs = {** kwargs ,'eng' : eng }
157163 yield name , bvals , data , algorithm , xfail , kwargs , tolerances
158164
159165
0 commit comments