@@ -108,11 +108,15 @@ def algorithms():
108
108
algorithm_information = json .load (f )
109
109
algorithms = algorithm_information ["algorithms" ]
110
110
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 )
116
120
#assert fit.bounds is not None, f"For {algorithm}, there is no default fit boundary"
117
121
#assert fit.initial_guess is not None, f"For {algorithm}, there is no default fit initial guess"
118
122
if fit .use_bounds :
@@ -154,6 +158,8 @@ def bound_input():
154
158
"strict" : algorithm_dict .get ("xfail_names" , {}).get (name , True )}
155
159
kwargs = algorithm_dict .get ("options" , {})
156
160
tolerances = algorithm_dict .get ("tolerances" , {})
161
+ if algorithm_dict .get ("requieres_matlab" , {}) == True :
162
+ kwargs = {** kwargs ,'eng' : eng }
157
163
yield name , bvals , data , algorithm , xfail , kwargs , tolerances
158
164
159
165
0 commit comments