8000 add flatsys xfails for platform=ubunto, BLAS=Generic, numpy=1.24.0 · python-control/python-control@b8c4e5c · GitHub
[go: up one dir, main page]

Skip to content

Commit b8c4e5c

Browse files
committed
add flatsys xfails for platform=ubunto, BLAS=Generic, numpy=1.24.0
1 parent f477c13 commit b8c4e5c

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

control/tests/flatsys_test.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import scipy as sp
1414
import re
1515
import warnings
16+
import os
17+
import platform
1618

1719
import control as ct
1820
import control.flatsys as fs
@@ -201,9 +203,26 @@ def test_kinematic_car_ocp(
201203
minimize_kwargs={'method': method},
202204
)
203205
xd, ud = traj_ocp.eval(timepts)
206+
204207
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")
207226

208227
# Make sure the constraints are satisfied
209228
if input_constraints:

0 commit comments

Comments
 (0)
0