diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-06-01 13:03:00 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-02 10:40:34 +0100 |
commit | 8c3a8c5d9fb31edbc37d8239c4cf5312a815a344 (patch) | |
tree | f86b116d92724e5f31fffbe70aa8224bd7a1a947 /meta/lib/oeqa/core | |
parent | 57f08e7ace4cc9486f86aafd1ade6ab5ad6a94d7 (diff) | |
download | openembedded-core-contrib-8c3a8c5d9fb31edbc37d8239c4cf5312a815a344.tar.gz |
oeqa/core/decorator/__init__.py: set metaclass to ABCMeta
OETestFilter is a subclass of OETestDecorator. It wants to make
use of @abstractmethod decorator. But such decorator requires
metaclass to be ABCMeta to have effect. So add it now to achieve
the designed behaviour.
Comments from python's manual:
"""
Using this decorator requires that the class's metaclass is ABCMeta
or is derived from it.
"""
(From OE-Core rev: 28c4fafb2322ea8c37bcd7710f22f46ef552a902)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/lib/oeqa/core')
-rw-r--r-- | meta/lib/oeqa/core/decorator/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py index 855b6b9d28..6ca0acf353 100644 --- a/meta/lib/oeqa/core/decorator/__init__.py +++ b/meta/lib/oeqa/core/decorator/__init__.py @@ -2,7 +2,7 @@ # Released under the MIT license (see COPYING.MIT) from functools import wraps -from abc import abstractmethod +from abc import abstractmethod, ABCMeta decoratorClasses = set() @@ -10,7 +10,7 @@ def registerDecorator(obj): decoratorClasses.add(obj) return obj -class OETestDecorator(object): +class OETestDecorator(object, metaclass=ABCMeta): case = None # Reference of OETestCase decorated attrs = None # Attributes to be loaded by decorator implementation |