File: test_qtwebenginewidgets.py

package info (click to toggle)
python-qtpy 2.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 924 kB
  • sloc: python: 4,767; sh: 28; makefile: 19
file content (25 lines) | stat: -rw-r--r-- 844 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import pytest
from packaging import version

from qtpy import PYQT5, PYQT6, PYQT_VERSION, PYSIDE2, PYSIDE6, PYSIDE_VERSION
from qtpy.tests.utils import pytest_importorskip


@pytest.mark.skipif(
    not (
        (PYQT6 and version.parse(PYQT_VERSION) >= version.parse("6.2"))
        or (PYSIDE6 and version.parse(PYSIDE_VERSION) >= version.parse("6.2"))
        or PYQT5
        or PYSIDE2
    ),
    reason="Only available in Qt<6,>=6.2 bindings",
)
def test_qtwebenginewidgets():
    """Test the qtpy.QtWebEngineWidget namespace"""

    QtWebEngineWidgets = pytest_importorskip("qtpy.QtWebEngineWidgets")

    assert QtWebEngineWidgets.QWebEnginePage is not None
    assert QtWebEngineWidgets.QWebEngineView is not None
    assert QtWebEngineWidgets.QWebEngineSettings is not None
    assert QtWebEngineWidgets.QWebEngineScript is not None