Skip to content

Commit 58090d3

Browse files
esantorellafacebook-github-bot
authored andcommitted
Fix codecov by raising UnsupportedError (#1662)
Summary: Pull Request resolved: #1662 Codecov is failing: https://app.codecov.io/gh/pytorch/botorch/commit/2f2b7e2163186e47da82b2da54b2fb0f001d9a7f Reviewed By: Balandat Differential Revision: D43120342 fbshipit-source-id: ea0c6ca035f6fcf116ecb1305d7367a9df55d48f
1 parent 2f2b7e2 commit 58090d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/optim/test_parameter_constraints.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ def test_make_linear_constraints(self):
127127
shapeX=torch.Size([1, 1, 2]),
128128
eq=False,
129129
)
130+
# test that len(shapeX) < 2 raises an error
131+
with self.assertRaises(UnsupportedError):
132+
_make_linear_constraints(
133+
shapeX=torch.Size([2]),
134+
indices=indices,
135+
coefficients=coefficients,
136+
rhs=0.0,
137+
)
130138

131139
def test_make_scipy_linear_constraints(self):
132140
for shapeX in [torch.Size([2, 1, 4]), torch.Size([1, 4])]:

0 commit comments

Comments
 (0)