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