Skip to content

Commit

Permalink
Merge pull request #208 from casparvl/rephrase_errors
Browse files Browse the repository at this point in the history
Rephrase error messages
  • Loading branch information
smoors authored Nov 20, 2024
2 parents 73acac4 + 1ab0d7e commit e2c2306
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eessi/testsuite/eessi_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def validate_init(self):
for var in var_list:
if not hasattr(self, var):
msg = "The variable '%s' should be defined in any test class that inherits" % var
msg += " from EESSI_Mixin in the init phase (or earlier), but it wasn't"
msg += " from EESSI_Mixin before (or in) the init phase, but it wasn't"
raise ReframeFatalError(msg)

# Check that the value for these variables is valid,
Expand Down Expand Up @@ -134,14 +134,14 @@ def validate_setup(self):
for var in var_list:
if not hasattr(self, var):
msg = "The variable '%s' should be defined in any test class that inherits" % var
msg += " from EESSI_Mixin in the setup phase (or earlier), but it wasn't"
msg += " from EESSI_Mixin before (or in) the setup phase, but it wasn't"
raise ReframeFatalError(msg)

# 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"
msg += " from EESSI_Mixin in the setup phase (or earlier), but it wasn't. Note that this function"
msg += " from EESSI_Mixin before (or in) the setup phase, but it wasn't. Note that this function"
msg += " can use self.num_tasks_per_node, as it will be called after that attribute"
msg += " has been set."
raise ReframeFatalError(msg)
Expand Down

0 comments on commit e2c2306

Please sign in to comment.