From a4bb4a46a86f1788033b3033d49a919d3e9cd3a5 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Wed, 18 Oct 2023 20:16:55 +0200 Subject: [PATCH] fix assert raises in model tests --- GPy/testing/test_model.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/GPy/testing/test_model.py b/GPy/testing/test_model.py index f78885af..9f49115d 100644 --- a/GPy/testing/test_model.py +++ b/GPy/testing/test_model.py @@ -743,15 +743,10 @@ class TestMisc: ks = [] for i in range(points.shape[0]): if (i % 2 == 0) and (i % 3 != 0): - self.assertRaises( - AssertionError, - GPy.kern.LogisticBasisFuncKernel, - 1, - points, - ARD=i % 2 == 0, - ARD_slope=i % 3 == 0, - active_dims=[i], - ) + with pytest.raises(AssertionError): + GPy.kern.LogisticBasisFuncKernel( + 1, points, ARD=i % 2 == 0, ARD_slope=i % 3 == 0, active_dims=[i] + ) else: ks.append( GPy.kern.LogisticBasisFuncKernel(