[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH 11/23] oeqa/core/decorator: remove redundant code
From: "Ross Burton" <ross () burtonini ! com>
Date: 2022-03-31 18:29:03
Message-ID: 20220331182915.22128-11-ross.burton () arm ! com
[Download RAW message or body]
Content-Transfer-Encoding: quoted-printable
There's no need to wrap *tags in a potential list, as *tags will always
be a tuple.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/lib/oeqa/core/decorator/__init__.py | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py
index 1a82518ab6a..93efd30e1db 100644
--- a/meta/lib/oeqa/core/decorator/__init__.py
+++ b/meta/lib/oeqa/core/decorator/__init__.py
@@ -5,8 +5,7 @@
#
from functools import wraps
-from abc import abstractmethod, ABCMeta
-from oeqa.core.utils.misc import strToList
+from abc import ABCMeta
decoratorClasses = set()
@@ -65,15 +64,11 @@ class OETestDiscover(OETestDecorator):
return registry['cases']
def OETestTag(*tags):
- expandedtags = []
- for tag in tags:
- expandedtags += strToList(tag)
def decorator(item):
if hasattr(item, "__oeqa_testtags"):
# do not append, create a new list (to handle classes with inheritance)
- item.__oeqa_testtags = list(item.__oeqa_testtags) + expandedtags
+ item.__oeqa_testtags = list(item.__oeqa_testtags) + list(tags)
else:
- item.__oeqa_testtags = expandedtags
+ item.__oeqa_testtags = tags
return item
return decorator
-
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163852): https://lists.openembedded.org/g/openembedded-core/message/163852
Mute This Topic: https://lists.openembedded.org/mt/90161346/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic