8000 Merge constraint constructor error tests in optimal_test · python-control/python-control@f591c08 · GitHub
[go: up one dir, main page]

Skip to content

Commit f591c08

Browse files
committed
Merge constraint constructor error tests in optimal_test
1 parent 5d7b798 commit f591c08

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

control/tests/optimal_test.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -381,17 +381,8 @@ def test_optimal_logging(capsys):
381381
@pytest.mark.parametrize("fun, args, exception, match", [
382382
[opt.quadratic_cost, (np.zeros((2, 3)), np.eye(2)), ValueError,
383383
"Q matrix is the wrong shape"],
384-
[opt.quadratic_cost, (np.eye(2), 1), ValueError,
384+
[opt.quadratic_cost, (np.eye(2), np.eye(2, 3)), ValueError,
385385
"R matrix is the wrong shape"],
386-
])
387-
def test_constraint_constructor_errors(fun, args, exception, match):
388-
"""Test various error conditions for constraint constructors"""
389-
sys = ct.ss2io(ct.rss(2, 2, 2))
390-
with pytest.raises(exception, match=match):
391-
fun(sys, *args)
392-
393-
394-
@pytest.mark.parametrize("fun, args, exception, match", [
395386
[opt.input_poly_constraint, (np.zeros((2, 3)), [0, 0]), ValueError,
396387
"polytope matrix must match number of inputs"],
397388
[opt.output_poly_constraint, (np.zeros((2, 3)), [0, 0]), ValueError,

0 commit comments

Comments
 (0)
0