Skip to content

Commit

Permalink
tests: Switch to pytest.raises
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Dec 18, 2024
1 parent 9c76b31 commit 5351bff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion devito/operator/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def arguments(self, **kwargs):
# Check all arguments are present
for p in self.parameters:
if args.get(p.name) is None:
raise InvalidArgument(f"No value found for parameter `{p.name}`")
raise InvalidArgument(f"No value found for parameter {p.name}")
return args

# Code generation and JIT compilation
Expand Down
6 changes: 1 addition & 5 deletions tests/test_buffering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5351bff

Please sign in to comment.