Skip to content

Commit 19ff896

Browse files
committed
Address PR comments
1 parent aa09d4e commit 19ff896

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

reframe/core/pipeline.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,17 @@ def disable_hook(cls, hook_name):
148148
'''
149149
cls._rfm_disabled_hooks.add(hook_name)
150150

151+
@classmethod
152+
def hooks(cls):
153+
ret = {}
154+
for c in cls.mro():
155+
if hasattr(c, '_rfm_pipeline_hooks'):
156+
for kind, hook in c._rfm_pipeline_hooks.items():
157+
ret.setdefault(kind, [])
158+
ret[kind] += hook
159+
160+
return ret
161+
151162
#: The name of the test.
152163
#:
153164
#: :type: string that can contain any character except ``/``
@@ -949,17 +960,6 @@ def stderr(self):
949960
'''
950961
return self._job.stderr
951962

952-
@property
953-
def hooks(self):
954-
ret = {}
955-
for c in inspect.getmro(type(self)):
956-
if hasattr(c, '_rfm_pipeline_hooks'):
957-
for k, v in c._rfm_pipeline_hooks.items():
958-
ret.setdefault(k, [])
959-
ret[k].extend(v)
960-
961-
return ret
962-
963963
@property
964964
def build_job(self):
965965
return self._build_job

reframe/frontend/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def fmt_deps():
7171
'Node allocation': node_alloc_scheme,
7272
'Pipeline hooks': {
7373
k: fmt_list(fn.__name__ for fn in v)
74-
for k, v in check.hooks.items()
74+
for k, v in type(check).hooks().items()
7575
},
7676
'Tags': fmt_list(check.tags),
7777
'Valid environments': fmt_list(check.valid_prog_environs),

0 commit comments

Comments
 (0)