Replace exec_ with exec
This commit is contained in:
@@ -32,7 +32,7 @@ from novelwriter.dialogs.editlabel import GuiEditLabel
|
||||
@pytest.mark.gui
|
||||
def testDlgOther_QuoteSelect(qtbot, monkeypatch, nwGUI):
|
||||
"""Test the quote symbols dialog."""
|
||||
monkeypatch.setattr(GuiQuoteSelect, "exec_", lambda *a: None)
|
||||
monkeypatch.setattr(GuiQuoteSelect, "exec", lambda *a: None)
|
||||
|
||||
nwQuot = GuiQuoteSelect(nwGUI)
|
||||
nwQuot.show()
|
||||
@@ -68,7 +68,7 @@ def testDlgOther_QuoteSelect(qtbot, monkeypatch, nwGUI):
|
||||
@pytest.mark.gui
|
||||
def testDlgOther_EditLabel(qtbot, monkeypatch):
|
||||
"""Test the label editor dialog."""
|
||||
monkeypatch.setattr(GuiEditLabel, "exec_", lambda *a: None)
|
||||
monkeypatch.setattr(GuiEditLabel, "exec", lambda *a: None)
|
||||
|
||||
with monkeypatch.context() as mp:
|
||||
mp.setattr(GuiEditLabel, "result", lambda *a: QDialog.Accepted)
|
||||
|
||||
@@ -38,7 +38,7 @@ KEY_DELAY = 1
|
||||
def testDlgPreferences_Main(qtbot, monkeypatch, nwGUI, tstPaths):
|
||||
"""Test the preferences dialog loading."""
|
||||
monkeypatch.setattr(SHARED._spelling, "listDictionaries", lambda: [("en", "English [en]")])
|
||||
monkeypatch.setattr(GuiPreferences, "exec_", lambda *a: None)
|
||||
monkeypatch.setattr(GuiPreferences, "exec", lambda *a: None)
|
||||
|
||||
# Load GUI with standard values
|
||||
nwGUI.mainMenu.aPreferences.activate(QAction.ActionEvent.Trigger)
|
||||
|
||||
@@ -42,7 +42,7 @@ def testDlgProjSettings_Dialog(qtbot, monkeypatch, nwGUI):
|
||||
test, but are instead tested in the individual tab tests.
|
||||
"""
|
||||
# Block the GUI blocking thread
|
||||
monkeypatch.setattr(GuiProjectSettings, "exec_", lambda *a: None)
|
||||
monkeypatch.setattr(GuiProjectSettings, "exec", lambda *a: None)
|
||||
monkeypatch.setattr(GuiProjectSettings, "result", lambda *a: QDialog.Accepted)
|
||||
|
||||
# Check that we cannot open when there is no project
|
||||
|
||||
@@ -38,7 +38,7 @@ def testDlgWordList_Dialog(qtbot, monkeypatch, nwGUI, fncPath, projPath):
|
||||
"""test the word list editor."""
|
||||
buildTestProject(nwGUI, projPath)
|
||||
|
||||
monkeypatch.setattr(GuiWordList, "exec_", lambda *a: None)
|
||||
monkeypatch.setattr(GuiWordList, "exec", lambda *a: None)
|
||||
monkeypatch.setattr(GuiWordList, "result", lambda *a: QDialog.Accepted)
|
||||
monkeypatch.setattr(GuiWordList, "accept", lambda *a: None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user