Make the test suite less spammy again
This commit is contained in:
+1
-3
@@ -164,9 +164,7 @@ def nwGUI(qtbot, monkeypatch, fncDir, fncConf):
|
|||||||
"""
|
"""
|
||||||
monkeypatch.setattr(QMessageBox, "warning", lambda *a: QMessageBox.Yes)
|
monkeypatch.setattr(QMessageBox, "warning", lambda *a: QMessageBox.Yes)
|
||||||
monkeypatch.setattr("novelwriter.CONFIG", fncConf)
|
monkeypatch.setattr("novelwriter.CONFIG", fncConf)
|
||||||
nwGUI = novelwriter.main(
|
nwGUI = novelwriter.main(["--testmode", "--config=%s" % fncDir, "--data=%s" % fncDir])
|
||||||
["--testmode", "--info", "--config=%s" % fncDir, "--data=%s" % fncDir]
|
|
||||||
)
|
|
||||||
qtbot.addWidget(nwGUI)
|
qtbot.addWidget(nwGUI)
|
||||||
nwGUI.show()
|
nwGUI.show()
|
||||||
qtbot.wait(20)
|
qtbot.wait(20)
|
||||||
|
|||||||
@@ -304,9 +304,7 @@ def testGuiProjTree_DeleteItems(qtbot, caplog, monkeypatch, nwGUI, fncDir, mockR
|
|||||||
# Delete item without focus -> blocked
|
# Delete item without focus -> blocked
|
||||||
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *a: False)
|
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *a: False)
|
||||||
nwTree.setSelectedHandle("0000000000012")
|
nwTree.setSelectedHandle("0000000000012")
|
||||||
caplog.clear()
|
|
||||||
assert nwTree.deleteItem() is False
|
assert nwTree.deleteItem() is False
|
||||||
assert "blocked" in caplog.text
|
|
||||||
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *a: True)
|
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *a: True)
|
||||||
|
|
||||||
# No selection made
|
# No selection made
|
||||||
@@ -399,10 +397,8 @@ def testGuiProjTree_DeleteItems(qtbot, caplog, monkeypatch, nwGUI, fncDir, mockR
|
|||||||
# ===========
|
# ===========
|
||||||
|
|
||||||
# Try to empty trash that is already empty
|
# Try to empty trash that is already empty
|
||||||
caplog.clear()
|
|
||||||
assert nwTree.getTreeFromHandle(trashHandle) == [trashHandle]
|
assert nwTree.getTreeFromHandle(trashHandle) == [trashHandle]
|
||||||
assert nwTree.emptyTrash() is False
|
assert nwTree.emptyTrash() is False
|
||||||
assert "already empty" in caplog.text
|
|
||||||
|
|
||||||
# Move the two remaining scene documents to trash
|
# Move the two remaining scene documents to trash
|
||||||
assert nwTree.deleteItem("000000000000f") is True
|
assert nwTree.deleteItem("000000000000f") is True
|
||||||
|
|||||||
Reference in New Issue
Block a user