From 29b1727b167f4520407636279c851a9a67cc368f Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 17 May 2024 11:04:59 +0200 Subject: [PATCH] SquishTests: Ignore non-kit items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id9b209171fc296fc65b6c6c1755df491ba7d4997 Reviewed-by: Robert Löhning --- tests/system/suite_general/tst_remove_kits/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_general/tst_remove_kits/test.py b/tests/system/suite_general/tst_remove_kits/test.py index 365f4b217f9..652390e0107 100644 --- a/tests/system/suite_general/tst_remove_kits/test.py +++ b/tests/system/suite_general/tst_remove_kits/test.py @@ -8,7 +8,9 @@ def verifyProjectsMode(expectedKits): bAndRIndex = getQModelIndexStr("text='Build & Run'", ":Projects.ProjectNavigationTreeView") foundKits = dumpItems(treeView.model(), waitForObject(bAndRIndex)) - relevantKits = list(filter(lambda x: 'Python' not in x,foundKits)) # ignore Python kits + # ignore Python kits and non-kit item + excludes = ('Python', 'Hide Inactive Kits', 'Show All Kits') + relevantKits = list(filter(lambda x: all(ex not in x for ex in excludes), foundKits)) test.compare(len(relevantKits), len(expectedKits), "Verify number of listed kits.") test.compare(set(relevantKits), set(expectedKits), "Verify if expected kits are listed.") hasKits = len(expectedKits) > 0