| 1 | from __future__ import annotations |
| 2 | |
| 3 | import os |
| 4 | import sys |
| 5 | |
| 6 | import pytest |
| 7 | |
| 8 | if sys.version_info == (3, 12, 0, "beta", 1) and "CI" in os.environ: |
| 9 | pytest.skip( |
| 10 | reason="Segfaults on GHA for unknown reasons", |
| 11 | allow_module_level=True, |
| 12 | ) |
| 13 | |
| 14 | pytest.importorskip("PyQt5.QtWebEngineWidgets") |
| 15 | |
| 16 | |
| 17 | def test_qt_output(pytester: pytest.Pytester) -> None: |
| 18 | pytester.makepyfile( |
| 19 | """ |
| 20 | import sys |
| 21 | import PyQt5.QtWebEngineWidgets |
| 22 | from PyQt5.QtWidgets import QWidget, QApplication |
| 23 | |
| 24 | app = QApplication(sys.argv) |
| 25 | |
| 26 | def test_widget(): |
| 27 | widget = QWidget() |
| 28 | widget.show() |
| 29 | """ |
| 30 | ) |
| 31 | res = pytester.runpytest() |
| 32 | assert res.ret == 0 |