File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 13
13
import scipy as sp
14
14
import re
15
15
import warnings
16
+ import os
17
+ import platform
16
18
17
19
import control as ct
18
20
import control .flatsys as fs
@@ -201,9 +203,26 @@ def test_kinematic_car_ocp(
201
203
minimize_kwargs = {'method' : method },
202
204
)
203
205
xd , ud = traj_ocp .eval (timepts )
206
+
204
207
if not traj_ocp .success :
205
- # If unsuccessful, make sure the error is just about precision
206
- assert re .match (".*precision loss.*" , traj_ocp .message ) is not None
208
+ # Known failure cases
209
+ if re .match (".*precision loss.*" , traj_ocp .message ):
210
+ pytest .xfail ("precision loss in some configurations" )
211
+
212
+ elif re .match ("Iteration limit.*" , traj_ocp .message ) and \
213
+ re .match ("ubuntu-3.* Generic" , os .getenv ('JOBNAME' )) and \
214
+ np .__version__ == '1.24.0' :
215
+ pytest .xfail ("gh820: iteration limit exceeded" )
216
+
217
+ else :
218
+ # Dump out information to allow creation of an exception
219
+ print ("Platform: " , platform .platform ())
220
+ print ("Python: " , platform .python_version ())
221
+ np .show_config ()
222
+ print ("JOBNAME: " , os .getenv ('JOBNAME' ))
223
+
224
+ pytest .fail (
225
+ "unknown failure; view output to identify configuration" )
207
226
208
227
# Make sure the constraints are satisfied
209
228
if input_constraints :
You can’t perform that action at this time.
0 commit comments