Make the test suite less spammy again

This commit is contained in:
Veronica Berglyd Olsen
2022-04-23 15:28:26 +02:00
parent b588fdfe1a
commit 31fac7bf45
2 changed files with 1 additions and 7 deletions
+1 -3
View File
@@ -164,9 +164,7 @@ def nwGUI(qtbot, monkeypatch, fncDir, fncConf):
"""
monkeypatch.setattr(QMessageBox, "warning", lambda *a: QMessageBox.Yes)
monkeypatch.setattr("novelwriter.CONFIG", fncConf)
nwGUI = novelwriter.main(
["--testmode", "--info", "--config=%s" % fncDir, "--data=%s" % fncDir]
)
nwGUI = novelwriter.main(["--testmode", "--config=%s" % fncDir, "--data=%s" % fncDir])
qtbot.addWidget(nwGUI)
nwGUI.show()
qtbot.wait(20)
-4
View File
@@ -304,9 +304,7 @@ def testGuiProjTree_DeleteItems(qtbot, caplog, monkeypatch, nwGUI, fncDir, mockR
# Delete item without focus -> blocked
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *a: False)
nwTree.setSelectedHandle("0000000000012")
caplog.clear()
assert nwTree.deleteItem() is False
assert "blocked" in caplog.text
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *a: True)
# No selection made
@@ -399,10 +397,8 @@ def testGuiProjTree_DeleteItems(qtbot, caplog, monkeypatch, nwGUI, fncDir, mockR
# ===========
# Try to empty trash that is already empty
caplog.clear()
assert nwTree.getTreeFromHandle(trashHandle) == [trashHandle]
assert nwTree.emptyTrash() is False
assert "already empty" in caplog.text
# Move the two remaining scene documents to trash
assert nwTree.deleteItem("000000000000f") is True