Skip to content

Commit

Permalink
More clear SyntaxError message
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Sep 4, 2024
1 parent 67d3e4e commit f096cb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eessi/testsuite/eessi_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def validate_setup(self):
# Check if mem_func was defined to compute the required memory per node as function of the number of tasks per node
if not hasattr(self, 'required_mem_per_node'):
msg = "The function 'required_mem_per_node' should be defined in any test class that inherits from EESSI_Mixin in the setup phase (or earlier), "
msg += "but it wasn't. It should be a function that takes the number of tasks per node as argument, and return the memory per node required"
msg += "but it wasn't. Note that this function can use self.num_tasks_per_node, as it will be called after that attribute "
msg += "has been set"
raise ReframeSyntaxError(msg)

# Check that the value for these variables is valid, i.e. exists in their respetive dict from eessi.testsuite.constants
Expand Down

0 comments on commit f096cb9

Please sign in to comment.