Skip to content

Commit

Permalink
Merge pull request #89 from maresb/specify-pytest-qt-api
Browse files Browse the repository at this point in the history
Explicitly specify the pytest-qt API
  • Loading branch information
maresb authored Oct 14, 2024
2 parents dbeb782 + 2940d2b commit f5ce354
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,18 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
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
/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
sudo apt-get update && 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
/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
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ replacement = '<img src="https://raw.githubusercontent.com/labelle-org/labelle/m
pattern = '\[(.*?)\]\(((?!https?://)\S+)\)'
replacement = '[\1](https://github.com/labelle-org/labelle/tree/main/\g<2>)'

[tool.pytest.ini_options]
qt_api = "pyqt6"

[tool.tox]
legacy_tox_ini = """
[tox]
Expand Down
4 changes: 3 additions & 1 deletion src/labelle/gui/tests/test_gui.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from pytestqt.qtbot import QtBot

from labelle.gui.gui import LabelleWindow
from labelle.gui.q_label_widgets import (
TextDymoLabelWidget,
)


def test_main_window(qtbot):
def test_main_window(qtbot: QtBot):
widget = LabelleWindow()
qtbot.addWidget(widget)

Expand Down

0 comments on commit f5ce354

Please sign in to comment.