From 19aa3c073951a917a8c44f6801d5605e3cc3f909 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:14:56 +0200 Subject: [PATCH] Don't use the link click path --- tests/test_gui.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_gui.py b/tests/test_gui.py index 6d6005c5..fd1f426d 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -8,7 +8,7 @@ from shutil import copyfile from nwtools import cmpFiles from os import path -from PyQt5.QtCore import Qt, QPoint +from PyQt5.QtCore import Qt, QUrl, QPoint from PyQt5.QtGui import QTextCursor from PyQt5.QtWidgets import qApp, QAction, QTreeWidgetItem @@ -410,7 +410,8 @@ def testDocViewer(qtbot, nwLipsum, nwTemp): assert nwGUI.docViewer.setCursorPosition(27) nwGUI.docViewer._makeSelection(QTextCursor.WordUnderCursor) theRect = nwGUI.docViewer.cursorRect() - qtbot.mouseClick(nwGUI.docViewer.viewport(), Qt.LeftButton, pos=theRect.center(), delay=100) + # qtbot.mouseClick(nwGUI.docViewer.viewport(), Qt.LeftButton, pos=theRect.center(), delay=100) + nwGUI.docViewer._linkClicked(QUrl("#char=Bod")) assert nwGUI.docViewer.theHandle == "4c4f28287af27" # Click mouse nav buttons