summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2023-06-24 00:28:05 +0200
committerFlorian Bruhin <me@the-compiler.org>2023-06-30 19:29:28 +0200
commitffc06e58d6d6254d1758f8328f6dc43cc38651d5 (patch)
tree8d1bc8453e178ac1fd2980cd3590e46118a274df /tests
parent0ac074575d17bd35c5988527a5f1238039794436 (diff)
downloadqutebrowser-ffc06e58d6d6254d1758f8328f6dc43cc38651d5.tar.gz
qutebrowser-ffc06e58d6d6254d1758f8328f6dc43cc38651d5.zip
qt6: Switch most tooling/linting to Qt 6
Only mypy missing now...
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/browser/webkit/test_tabhistory.py5
-rw-r--r--tests/unit/javascript/test_js_execution.py7
2 files changed, 4 insertions, 8 deletions
diff --git a/tests/unit/browser/webkit/test_tabhistory.py b/tests/unit/browser/webkit/test_tabhistory.py
index 047454e25..cd40af6e8 100644
--- a/tests/unit/browser/webkit/test_tabhistory.py
+++ b/tests/unit/browser/webkit/test_tabhistory.py
@@ -15,9 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
-# FIXME:qt6 (lint)
-# pylint: disable=no-name-in-module
-
"""Tests for webelement.tabhistory."""
import dataclasses
@@ -26,7 +23,9 @@ from typing import Any
import pytest
pytest.importorskip('qutebrowser.qt.webkit')
from qutebrowser.qt.core import QUrl, QPoint
+# pylint: disable=no-name-in-module
from qutebrowser.qt.webkit import QWebHistory
+# pylint: enable=no-name-in-module
from qutebrowser.browser.webkit import tabhistory
from qutebrowser.misc.sessions import TabHistoryItem as Item
diff --git a/tests/unit/javascript/test_js_execution.py b/tests/unit/javascript/test_js_execution.py
index 542b56975..fd2469148 100644
--- a/tests/unit/javascript/test_js_execution.py
+++ b/tests/unit/javascript/test_js_execution.py
@@ -15,9 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
-# FIXME:qt6 (lint)
-# pylint: disable=no-name-in-module
-
"""Check how Qt behaves when trying to execute JS."""
@@ -29,7 +26,7 @@ def test_simple_js_webkit(webview, js_enabled, expected):
"""With QtWebKit, evaluateJavaScript works when JS is on."""
# If we get there (because of the webview fixture) we can be certain
# QtWebKit is available
- from qutebrowser.qt.webkit import QWebSettings
+ from qutebrowser.qt.webkit import QWebSettings # pylint: disable=no-name-in-module
webview.settings().setAttribute(QWebSettings.WebAttribute.JavascriptEnabled, js_enabled)
result = webview.page().mainFrame().evaluateJavaScript('1 + 1')
assert result == expected
@@ -40,7 +37,7 @@ def test_element_js_webkit(webview, js_enabled, expected):
"""With QtWebKit, evaluateJavaScript on an element works with JS off."""
# If we get there (because of the webview fixture) we can be certain
# QtWebKit is available
- from qutebrowser.qt.webkit import QWebSettings
+ from qutebrowser.qt.webkit import QWebSettings # pylint: disable=no-name-in-module
webview.settings().setAttribute(QWebSettings.WebAttribute.JavascriptEnabled, js_enabled)
elem = webview.page().mainFrame().documentElement()
result = elem.evaluateJavaScript('1 + 1')