From 90ca8f481dcfef9910823f40284938cdbdfd00a1 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:58:57 +0200 Subject: [PATCH] Disable checking spelling in tests on Windows --- tests/test_gui/test_gui_guimain.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py index 70d47fe6..30a17c5b 100644 --- a/tests/test_gui/test_gui_guimain.py +++ b/tests/test_gui/test_gui_guimain.py @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ +import sys import pytest from shutil import copyfile @@ -518,11 +519,13 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd): assert docEditor._qDocument.spellErrorAtPos(currPos) == ("", -1, -1, []) errPos = currPos - 13 - word, cPos, cLen, suggest = docEditor._qDocument.spellErrorAtPos(errPos) - assert word == "tesst" - assert cPos == 15 - assert cLen == 5 - assert "test" in suggest + if not sys.platform.startswith("win32"): + # Skip on Windows as spell checking is off there + word, cPos, cLen, suggest = docEditor._qDocument.spellErrorAtPos(errPos) + assert word == "tesst" + assert cPos == 15 + assert cLen == 5 + assert "test" in suggest with monkeypatch.context() as mp: mp.setattr(QMenu, "exec_", lambda *a: None)