summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-06-01 13:03:00 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-04 15:15:00 +0100
commita233b59fb0b86b3225425b2a45bd4b2ce6d27c22 (patch)
tree72b409d48e76ed76990151a334415f6fdf0c2562 /meta/lib/oeqa
parent4afe2567b7e93a7be00434304b268919f2bf4220 (diff)
downloadpoky-a233b59fb0b86b3225425b2a45bd4b2ce6d27c22.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>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/core/decorator/__init__.py4
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 @@
2# Released under the MIT license (see COPYING.MIT) 2# Released under the MIT license (see COPYING.MIT)
3 3
4from functools import wraps 4from functools import wraps
5from abc import abstractmethod 5from abc import abstractmethod, ABCMeta
6 6
7decoratorClasses = set() 7decoratorClasses = set()
8 8
@@ -10,7 +10,7 @@ def registerDecorator(obj):
10 decoratorClasses.add(obj) 10 decoratorClasses.add(obj)
11 return obj 11 return obj
12 12
13class OETestDecorator(object): 13class OETestDecorator(object, metaclass=ABCMeta):
14 case = None # Reference of OETestCase decorated 14 case = None # Reference of OETestCase decorated
15 attrs = None # Attributes to be loaded by decorator implementation 15 attrs = None # Attributes to be loaded by decorator implementation
16 16