From 42eee344d7aa16aa8e33aaa7c7831ebcf49a91ad Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Tue, 17 Dec 2024 14:20:58 +0000 Subject: [PATCH] tests: Switch to pytest.raises --- tests/test_buffering.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/test_buffering.py b/tests/test_buffering.py index aebde40eff..c1196466e3 100644 --- a/tests/test_buffering.py +++ b/tests/test_buffering.py @@ -351,12 +351,8 @@ def define(self, dimensions): eqns = [Eq(u.forward, u + 1, subdomain=s_d0), Eq(u.forward, u.forward + 1, subdomain=s_d1)] - try: + with pytest.raises(CompilationError): Operator(eqns, opt='buffering') - except CompilationError: - assert True - except: - assert False @pytest.mark.xfail(reason="Cannot deal with non-overlapping SubDimensions yet")