Fix warnings in tests

This commit is contained in:
Veronica Berglyd Olsen
2025-01-13 19:43:04 +01:00
parent 72ed5d84f6
commit 0b7c31b6a9
11 changed files with 336 additions and 102 deletions
+3 -1
View File
@@ -1148,7 +1148,9 @@ def testGuiProjTree_ContextMenu(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
def getTransformSubMenu(menu: QMenu) -> list[str]:
for action in menu.actions():
if action.text() == "Transform ...":
return [x.text() for x in action.menu().actions() if x.text()]
submenu = action.menu()
assert submenu is not None
return [x.text() for x in submenu.actions() if x.text()]
return []
# Context Menu on Document File Item