Skip to content

Pipeline hooks are not inherited #991

@vkarak

Description

@vkarak

The following (new) unit test fails:

    def test_inherited_hooks(self):
        import unittests.resources.checks.hellocheck as mod

        class BaseTest(mod.HelloTest):
            def __init__(self):
                super().__init__()
                self._prefix = 'unittests/resources/checks'
                self.name = type(self).__name__
                self.executable = os.path.join('.', self.name)
                self.var = 0

            @rfm.run_after('setup')
            def x(self):
                self.var += 1

        class MyTest(BaseTest):
            pass

        test = MyTest()
        _run(test, self.partition, self.prgenv)
        assert test.var == 1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions