17
0

6 Commits

Author SHA256 Message Date
3a06e17ac0 Accepting request 1283039 from devel:languages:python:pytest
- Drop tests for python3-pyside2 and python-qt5 as Standard Qt 5
  support officially ends after 26th of may 2025.
  (boo#1243916)

OBS-URL: https://build.opensuse.org/request/show/1283039
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-qt?expand=0&rev=22
2025-06-05 18:35:05 +00:00
f882c3e069 - Drop tests for python3-pyside2 and python-qt5 as Standard Qt 5
support officially ends after 26th of may 2025.
  (boo#1243916)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=40
2025-06-05 10:23:35 +00:00
50aa7b3669 Accepting request 1249316 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/1249316
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-qt?expand=0&rev=21
2025-03-01 18:16:37 +00:00
b4863c8fc1 - Add patch to fix a test that fails when building with the latest
pyside6 instead of skipping it:
  * fix-pyside6-test.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=38
2025-02-28 20:22:30 +00:00
2d577a7278 Accepting request 1248730 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/1248730
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-qt?expand=0&rev=20
2025-02-26 16:25:07 +00:00
cfdf07bffd - Skip test_qtinfo failing test with latest python3-pyside6
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=36
2025-02-26 13:42:26 +00:00
5 changed files with 42 additions and 28 deletions

34
fix-pyside6-test.patch Normal file
View File

@@ -0,0 +1,34 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Fix test_qinfo when building with latest pyside6
The qInfo test fails when detecting it's running with pyside because
it assumes pyside2/6 doesn't expose qInfo. But pyside6 does. So we
can just remove the case from the condition and let the qInfo test
run normally.
Index: pytest-qt-4.4.0/tests/test_logging.py
===================================================================
--- pytest-qt-4.4.0.orig/tests/test_logging.py
+++ pytest-qt-4.4.0/tests/test_logging.py
@@ -3,6 +3,7 @@ import datetime
import pytest
from pytestqt.qt_compat import qt_api
+from packaging.version import Version
@pytest.mark.parametrize("test_succeeds", [True, False])
@@ -72,7 +73,12 @@ def test_qinfo(qtlog):
the other logging tests properly. #232
"""
- if qt_api.is_pyside:
+ if qt_api.pytest_qt_api == "pyside6":
+ import PySide6
+ pyside6_version = Version(PySide6.__version__)
+
+ if (qt_api.pytest_qt_api == "pyside2" or
+ (qt_api.pytest_qt_api == "pyside6" and pyside6_version < Version("6.8.2"))):
assert (
qt_api.qInfo is None
), "pyside2/6 does not expose qInfo. If it does, update this test."

BIN
pytest-qt-4.4.0.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:51620e01c488f065d2036425cbc1cbcf8a6972295105fd285321eb47e66a319f
size 128702

View File

@@ -1,23 +1,3 @@
-------------------------------------------------------------------
Tue Sep 30 09:17:30 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 4.5.0:
* Added official support for Python 3.13.
* Dropped support for EOL Python 3.8.
* Dropped support for EOL PySide 2.
* Type annotations are now provided. Note that because the Qt
library used is defined at runtime, Qt classes are currently
annotated as Any.
* Fixed PySide6 exceptions / warnings about being unable to
disconnect signals with qtbot.waitSignal (#552, #558).
* Reduced the likelyhood of trouble when using
qtbot.waitSignal(s) and qtbot.waitCallback where the
signal/callback is emitted from a non-main thread. In theory,
more problems remain and this isn't a proper fix yet. In
practice, it seems impossible to provoke any problems in
pytest-qt's testsuite.
- remove fix-pyside6-test.patch
-------------------------------------------------------------------
Thu Jun 5 10:11:48 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-qt
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -42,13 +42,14 @@ BuildRequires: %{python_module pyside6}
BuildConflicts: %{python_module PyQt6}
%endif
Name: python-pytest-qt%{psuffix}
Version: 4.5.0
Version: 4.4.0
Release: 0
Summary: Pytest support for PyQt and PySide applications
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pytest-dev/pytest-qt
Source: https://files.pythonhosted.org/packages/source/p/pytest-qt/pytest_qt-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/p/pytest-qt/pytest-qt-%{version}.tar.gz
Patch0: fix-pyside6-test.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
@@ -60,7 +61,6 @@ BuildRequires: python-rpm-macros >= 20210608
# https://github.com/pytest-dev/pytest-qt/issues/317
Requires: bitstream-vera-fonts
Requires: python-pytest >= 3.0
Requires: python-typing-extensions
Suggests: python-PyQt6
Suggests: python-pyside6
BuildArch: noarch
@@ -79,7 +79,7 @@ creation as needed and provides methods to simulate user interaction,
like key presses and mouse clicks.
%prep
%autosetup -p1 -n pytest_qt-%{version}
%autosetup -p1 -n pytest-qt-%{version}
dos2unix LICENSE
# https://github.com/pytest-dev/pytest-qt/pull/419#discussion_r1240198866
sed -i /xfail_strict/d setup.cfg