Disable checking spelling in tests on Windows
This commit is contained in:
@@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
@@ -518,11 +519,13 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
|
|||||||
assert docEditor._qDocument.spellErrorAtPos(currPos) == ("", -1, -1, [])
|
assert docEditor._qDocument.spellErrorAtPos(currPos) == ("", -1, -1, [])
|
||||||
|
|
||||||
errPos = currPos - 13
|
errPos = currPos - 13
|
||||||
word, cPos, cLen, suggest = docEditor._qDocument.spellErrorAtPos(errPos)
|
if not sys.platform.startswith("win32"):
|
||||||
assert word == "tesst"
|
# Skip on Windows as spell checking is off there
|
||||||
assert cPos == 15
|
word, cPos, cLen, suggest = docEditor._qDocument.spellErrorAtPos(errPos)
|
||||||
assert cLen == 5
|
assert word == "tesst"
|
||||||
assert "test" in suggest
|
assert cPos == 15
|
||||||
|
assert cLen == 5
|
||||||
|
assert "test" in suggest
|
||||||
|
|
||||||
with monkeypatch.context() as mp:
|
with monkeypatch.context() as mp:
|
||||||
mp.setattr(QMenu, "exec_", lambda *a: None)
|
mp.setattr(QMenu, "exec_", lambda *a: None)
|
||||||
|
|||||||
Reference in New Issue
Block a user