forked from pool/python-pytest-qt
Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 3a06e17ac0 | |||
| f882c3e069 | |||
| 50aa7b3669 | |||
| b4863c8fc1 | |||
| 2d577a7278 | |||
| cfdf07bffd |
@@ -1,6 +1,4 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
<flavor>test-pyqt5</flavor>
|
|
||||||
<flavor>test-pyqt6</flavor>
|
<flavor>test-pyqt6</flavor>
|
||||||
<flavor>test-pyside2</flavor>
|
|
||||||
<flavor>test-pyside6</flavor>
|
<flavor>test-pyside6</flavor>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
|||||||
34
fix-pyside6-test.patch
Normal file
34
fix-pyside6-test.patch
Normal 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."
|
||||||
@@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 5 10:11:48 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Drop tests for python3-pyside2 and python-qt5 as Standard Qt 5
|
||||||
|
support officially ends after 26th of may 2025.
|
||||||
|
(boo#1243916)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 27 09:22:15 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- Add patch to fix a test that fails when building with the latest
|
||||||
|
pyside6 instead of skipping it:
|
||||||
|
* fix-pyside6-test.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 26 13:29:50 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Skip test_qtinfo failing test with latest python3-pyside6
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 29 10:45:04 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
Wed May 29 10:45:04 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-qt
|
# spec file for package python-pytest-qt
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -24,33 +24,12 @@
|
|||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%if "%{flavor}" == "test-pyqt5"
|
|
||||||
%define psuffix -%{flavor}
|
|
||||||
%define test_qtapi pyqt5
|
|
||||||
%bcond_without test
|
|
||||||
BuildRequires: %{python_module qt5}
|
|
||||||
BuildConflicts: %{python_module PyQt6}
|
|
||||||
BuildConflicts: %{python_module pyside2}
|
|
||||||
BuildConflicts: %{python_module pyside6}
|
|
||||||
%endif
|
|
||||||
%if "%{flavor}" == "test-pyqt6"
|
%if "%{flavor}" == "test-pyqt6"
|
||||||
%define psuffix -%{flavor}
|
%define psuffix -%{flavor}
|
||||||
%define test_qtapi pyqt6
|
%define test_qtapi pyqt6
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
BuildRequires: %{python_module PyQt6}
|
BuildRequires: %{python_module PyQt6}
|
||||||
BuildConflicts: %{python_module pyside2}
|
|
||||||
BuildConflicts: %{python_module pyside6}
|
BuildConflicts: %{python_module pyside6}
|
||||||
BuildConflicts: %{python_module qt5}
|
|
||||||
%endif
|
|
||||||
%if "%{flavor}" == "test-pyside2"
|
|
||||||
%define psuffix -%{flavor}
|
|
||||||
%{!?sle15_python_module_pythons:%define pythons python3}
|
|
||||||
%define test_qtapi pyside2
|
|
||||||
%bcond_without test
|
|
||||||
BuildRequires: %{python_module pyside2}
|
|
||||||
BuildConflicts: %{python_module PyQt6}
|
|
||||||
BuildConflicts: %{python_module pyside6}
|
|
||||||
BuildConflicts: %{python_module qt5}
|
|
||||||
%endif
|
%endif
|
||||||
%if "%{flavor}" == "test-pyside6"
|
%if "%{flavor}" == "test-pyside6"
|
||||||
%define psuffix -%{flavor}
|
%define psuffix -%{flavor}
|
||||||
@@ -61,8 +40,6 @@ BuildConflicts: %{python_module qt5}
|
|||||||
%bcond_without test
|
%bcond_without test
|
||||||
BuildRequires: %{python_module pyside6}
|
BuildRequires: %{python_module pyside6}
|
||||||
BuildConflicts: %{python_module PyQt6}
|
BuildConflicts: %{python_module PyQt6}
|
||||||
BuildConflicts: %{python_module pyside2}
|
|
||||||
BuildConflicts: %{python_module qt5}
|
|
||||||
%endif
|
%endif
|
||||||
Name: python-pytest-qt%{psuffix}
|
Name: python-pytest-qt%{psuffix}
|
||||||
Version: 4.4.0
|
Version: 4.4.0
|
||||||
@@ -72,6 +49,7 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/pytest-dev/pytest-qt
|
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 base >= 3.8}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
@@ -84,9 +62,7 @@ BuildRequires: python-rpm-macros >= 20210608
|
|||||||
Requires: bitstream-vera-fonts
|
Requires: bitstream-vera-fonts
|
||||||
Requires: python-pytest >= 3.0
|
Requires: python-pytest >= 3.0
|
||||||
Suggests: python-PyQt6
|
Suggests: python-PyQt6
|
||||||
Suggests: python-pyside2
|
|
||||||
Suggests: python-pyside6
|
Suggests: python-pyside6
|
||||||
Suggests: python-qt5
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module pytest-qt = %{version}}
|
BuildRequires: %{python_module pytest-qt = %{version}}
|
||||||
@@ -103,7 +79,7 @@ creation as needed and provides methods to simulate user interaction,
|
|||||||
like key presses and mouse clicks.
|
like key presses and mouse clicks.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pytest-qt-%{version}
|
%autosetup -p1 -n pytest-qt-%{version}
|
||||||
dos2unix LICENSE
|
dos2unix LICENSE
|
||||||
# https://github.com/pytest-dev/pytest-qt/pull/419#discussion_r1240198866
|
# https://github.com/pytest-dev/pytest-qt/pull/419#discussion_r1240198866
|
||||||
sed -i /xfail_strict/d setup.cfg
|
sed -i /xfail_strict/d setup.cfg
|
||||||
|
|||||||
Reference in New Issue
Block a user