From d6eebc2cc33ce938d28ea787779eec9909257e58 Mon Sep 17 00:00:00 2001 From: "Rutkowski, Adam J" Date: Mon, 26 Sep 2022 11:07:27 +0200 Subject: [PATCH] test framework: method to get cache modes without given trait Signed-off-by: Rutkowski, Adam J --- test/functional/api/cas/cache_config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/functional/api/cas/cache_config.py b/test/functional/api/cas/cache_config.py index 8be59f7..cf1d622 100644 --- a/test/functional/api/cas/cache_config.py +++ b/test/functional/api/cas/cache_config.py @@ -60,6 +60,12 @@ class CacheMode(Enum): m for m in CacheMode if all(map(lambda t: t in CacheMode.get_traits(m), flags)) ] + @staticmethod + def without_traits(flags: CacheModeTrait): + return [ + m for m in CacheMode if not any(map(lambda t: t in CacheMode.get_traits(m), flags)) + ] + @staticmethod def with_any_trait(flags: CacheModeTrait): return [