Update tests and test coverage

This commit is contained in:
Veronica Berglyd Olsen
2025-10-25 22:37:19 +02:00
parent 1938969a63
commit 2d67cb7dcc
12 changed files with 105 additions and 37 deletions
+1 -3
View File
@@ -24,7 +24,7 @@ import sys
import pytest
from PyQt6.QtWidgets import QApplication, QDialog, QMessageBox
from PyQt6.QtWidgets import QApplication, QDialog
from novelwriter import CONFIG, SHARED
from novelwriter.dialogs.about import GuiAbout
@@ -49,8 +49,6 @@ LANG_DATA = CONFIG.listLanguages(CONFIG.LANG_NW)
def testGuiI18n_Localisation(qtbot, monkeypatch, language, nwGUI, projPath):
"""Test loading the gui with a specific language."""
monkeypatch.setattr(QDialog, "exec", lambda *a: None)
monkeypatch.setattr(QMessageBox, "exec", lambda *a: None)
monkeypatch.setattr(QMessageBox, "result", lambda *a: QMessageBox.StandardButton.Yes)
# Set the test language
CONFIG.guiLocale = language