Update tests

This commit is contained in:
Veronica Berglyd Olsen
2024-05-27 23:36:53 +02:00
parent b33bf954bb
commit 087a9cdd2e
6 changed files with 68 additions and 31 deletions
+3 -2
View File
@@ -23,11 +23,12 @@ from __future__ import annotations
import pytest
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QAction, QDialog, QFileDialog
from PyQt5.QtWidgets import QAction, QFileDialog
from novelwriter import SHARED
from novelwriter.core.spellcheck import UserDictionary
from novelwriter.dialogs.wordlist import GuiWordList
from novelwriter.types import QtAccepted
from tests.mocked import causeOSError
from tests.tools import buildTestProject
@@ -39,7 +40,7 @@ def testDlgWordList_Dialog(qtbot, monkeypatch, nwGUI, fncPath, projPath):
buildTestProject(nwGUI, projPath)
monkeypatch.setattr(GuiWordList, "exec", lambda *a: None)
monkeypatch.setattr(GuiWordList, "result", lambda *a: QDialog.DialogCode.Accepted)
monkeypatch.setattr(GuiWordList, "result", lambda *a: QtAccepted)
monkeypatch.setattr(GuiWordList, "accept", lambda *a: None)
# Open project