Replace exec_ with exec

This commit is contained in:
Veronica Berglyd Olsen
2024-04-03 18:41:39 +02:00
parent c8fe5e6620
commit f95bbb8760
28 changed files with 49 additions and 49 deletions
+2 -2
View File
@@ -142,7 +142,7 @@ def projPath(fncPath):
@pytest.fixture(scope="function")
def mockGUI(qtbot, monkeypatch):
"""Create a mock instance of novelWriter's main GUI class."""
monkeypatch.setattr(QMessageBox, "exec_", lambda *a: None)
monkeypatch.setattr(QMessageBox, "exec", lambda *a: None)
monkeypatch.setattr(QMessageBox, "result", lambda *a: QMessageBox.Yes)
gui = MockGuiMain()
theme = MockTheme()
@@ -154,7 +154,7 @@ def mockGUI(qtbot, monkeypatch):
@pytest.fixture(scope="function")
def nwGUI(qtbot, monkeypatch, functionFixture):
"""Create an instance of the novelWriter GUI."""
monkeypatch.setattr(QMessageBox, "exec_", lambda *a: None)
monkeypatch.setattr(QMessageBox, "exec", lambda *a: None)
monkeypatch.setattr(QMessageBox, "result", lambda *a: QMessageBox.Yes)
nwGUI = main(["--testmode", f"--config={_TMP_CONF}", f"--data={_TMP_CONF}"])