Skip to content

Commit f5ce354

Browse files
authored
Merge pull request #89 from maresb/specify-pytest-qt-api
Explicitly specify the pytest-qt API
2 parents dbeb782 + 2940d2b commit f5ce354

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,18 @@ jobs:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install dependencies
2525
run: |
26-
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils libgl1 libdbus-1-3 libxcb-cursor0
27-
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
26+
sudo apt-get update && sudo apt-get install -y \
27+
libegl1 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 \
28+
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
29+
libxcb-xinerama0 libxcb-xfixes0 x11-utils libgl1 \
30+
libdbus-1-3 libxcb-cursor0
31+
/sbin/start-stop-daemon --start --quiet \
32+
--pidfile /tmp/custom_xvfb_99.pid \
33+
--make-pidfile \
34+
--background \
35+
--exec /usr/bin/Xvfb \
36+
-- \
37+
:99 -screen 0 1920x1200x24 -ac +extension GLX
2838
python -m pip install --upgrade pip
2939
pip install tox tox-gh-actions
3040
- name: Test with tox

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ replacement = '<img src="https://raw.githubusercontent.com/labelle-org/labelle/m
8989
pattern = '\[(.*?)\]\(((?!https?://)\S+)\)'
9090
replacement = '[\1](https://github.com/labelle-org/labelle/tree/main/\g<2>)'
9191

92+
[tool.pytest.ini_options]
93+
qt_api = "pyqt6"
94+
9295
[tool.tox]
9396
legacy_tox_ini = """
9497
[tox]

src/labelle/gui/tests/test_gui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
from pytestqt.qtbot import QtBot
2+
13
from labelle.gui.gui import LabelleWindow
24
from labelle.gui.q_label_widgets import (
35
TextDymoLabelWidget,
46
)
57

68

7-
def test_main_window(qtbot):
9+
def test_main_window(qtbot: QtBot):
810
widget = LabelleWindow()
911
qtbot.addWidget(widget)
1012

0 commit comments

Comments
 (0)