Add no-cover pragma for _rect_on_view_js

This commit is contained in:
Florian Bruhin 2016-07-28 17:29:59 +02:00
parent 80d4af0da2
commit b48b7eddc8

View File

@ -367,7 +367,7 @@ class WebElementWrapper(collections.abc.MutableMapping):
def _rect_on_view_js(self, adjust_zoom):
"""Javascript implementation for rect_on_view."""
rects = self._elem.evaluateJavaScript("this.getClientRects()")
if rects is None:
if rects is None: # pragma: no cover
# Depending on unknown circumstances, this might not work with JS
# disabled in QWebSettings:
# https://github.com/The-Compiler/qutebrowser/issues/1641