Add some coverage pragmas for caret workarounds.

This commit is contained in:
Florian Bruhin 2016-01-06 17:52:44 +01:00
parent 9720d879ad
commit 3f15186a64

View File

@ -1462,11 +1462,11 @@ class CommandDispatcher:
webview = self._current_widget()
if not webview.selection_enabled:
act = [QWebPage.MoveToNextWord]
if sys.platform == 'win32':
if sys.platform == 'win32': # pragma: no cover
act.append(QWebPage.MoveToPreviousChar)
else:
act = [QWebPage.SelectNextWord]
if sys.platform == 'win32':
if sys.platform == 'win32': # pragma: no cover
act.append(QWebPage.SelectPreviousChar)
for _ in range(count):
for a in act:
@ -1483,11 +1483,11 @@ class CommandDispatcher:
webview = self._current_widget()
if not webview.selection_enabled:
act = [QWebPage.MoveToNextWord]
if sys.platform != 'win32':
if sys.platform != 'win32': # pragma: no branch
act.append(QWebPage.MoveToNextChar)
else:
act = [QWebPage.SelectNextWord]
if sys.platform != 'win32':
if sys.platform != 'win32': # pragma: no branch
act.append(QWebPage.SelectNextChar)
for _ in range(count):
for a in act: