Skip to content

Commit 8bf4581

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1888 from jjotero/feat/improve-error-messages
[feat] Improve error message when parameters are undefined
2 parents 7eef1a8 + 85dca12 commit 8bf4581

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

reframe/core/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def _validate_test(cls):
8585
'subclass of RegressionTest')
8686

8787
if (cls.is_abstract()):
88-
raise ValueError(f'decorated test ({cls.__qualname__!r}) is an'
89-
f' abstract test')
88+
raise ValueError(f'decorated test ({cls.__qualname__!r}) has one or '
89+
f'more undefined parameters')
9090

9191

9292
def simple_test(cls):

reframe/core/meta.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,12 @@ def param_space(cls):
233233
return cls._rfm_param_space
234234

235235
def is_abstract(cls):
236-
'''Check if the test is an abstract test.
236+
'''Check if the class is an abstract test.
237237
238-
If the parameter space has undefined parameters, the test is considered
239-
an abstract test. If that is the case, the length of the parameter
240-
space is just 0.
238+
This is the case when some parameters are undefined, which results in
239+
the length of the parameter space being 0.
241240
242-
:return: bool indicating wheteher the test is abstract or not
241+
:return: bool indicating wheteher the test has undefined parameters.
243242
244243
:meta private:
245244
'''

unittests/test_parameters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TwoParams(NoParams):
2121

2222

2323
class Abstract(TwoParams):
24+
'''An abstract test is a test with undefined parameters.'''
2425
P0 = parameter()
2526

2627

0 commit comments

Comments
 (0)