fix assert raises in model tests

This commit is contained in:
Martin Bubel 2023-10-18 20:16:55 +02:00
parent b7d6b0a0cc
commit a4bb4a46a8

View file

@ -743,15 +743,10 @@ class TestMisc:
ks = [] ks = []
for i in range(points.shape[0]): for i in range(points.shape[0]):
if (i % 2 == 0) and (i % 3 != 0): if (i % 2 == 0) and (i % 3 != 0):
self.assertRaises( with pytest.raises(AssertionError):
AssertionError, GPy.kern.LogisticBasisFuncKernel(
GPy.kern.LogisticBasisFuncKernel, 1, points, ARD=i % 2 == 0, ARD_slope=i % 3 == 0, active_dims=[i]
1, )
points,
ARD=i % 2 == 0,
ARD_slope=i % 3 == 0,
active_dims=[i],
)
else: else:
ks.append( ks.append(
GPy.kern.LogisticBasisFuncKernel( GPy.kern.LogisticBasisFuncKernel(