Accepting request 837360 from home:bnavigator:branches:devel:languages:python:pytest

- require a default ttf font gh#pytest-dev/pytest-qt#317
- move to %pytest macro and use pytest-xvfb plugin
- drop skip-timeout-tests.patch; deselect by pytest -k parameter

OBS-URL: https://build.opensuse.org/request/show/837360
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=10
This commit is contained in:
Tomáš Chvátal 2020-09-25 10:25:35 +00:00 committed by Git OBS Bridge
parent 0d37ee1048
commit e705392566
3 changed files with 15 additions and 22 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Sep 25 09:19:58 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- require a default ttf font gh#pytest-dev/pytest-qt#317
- move to %pytest macro and use pytest-xvfb plugin
- drop skip-timeout-tests.patch; deselect by pytest -k parameter
-------------------------------------------------------------------
Mon Jan 6 13:07:28 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -25,17 +25,18 @@ License: MIT
Group: Development/Languages/Python
URL: http://github.com/pytest-dev/pytest-qt
Source: https://files.pythonhosted.org/packages/source/p/pytest-qt/pytest-qt-%{version}.tar.gz
Patch0: skip-timeout-tests.patch
BuildRequires: %{python_module pytest >= 3.0}
BuildRequires: %{python_module pytest-xvfb}
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: xvfb-run
Requires: python-pytest >= 3.0
Requires: python-qt5
# https://github.com/pytest-dev/pytest-qt/issues/317
Requires: free-ttf-fonts
BuildArch: noarch
%python_subpackages
@ -49,7 +50,6 @@ like key presses and mouse clicks.
%prep
%setup -q -n pytest-qt-%{version}
%patch0 -p1
dos2unix LICENSE
%build
@ -61,16 +61,14 @@ dos2unix LICENSE
%check
export PYTEST_QT_API=pyqt5
export PYTHONDONTWRITEBYTECODE=1
# skip test_qt_api_ini_config_with_envvar as it needs the qt4 and pyside/etc
# same applies for test_qt_api_ini_config
%{python_expand export PYTHONPATH="%{buildroot}%{$python_sitelib}"
xvfb-run --server-args="-screen 0 1920x1080x24" py.test-%{$python_bin_suffix} -k 'not test_qt_api_ini_config_with_envvar and not test_qt_api_ini_config'
}
# test_qt_api_ini_config* needs the qt4 and pyside/etc
# test_wait_window fails randomly on OBS
%pytest -k 'not (test_qt_api_ini_config or test_wait_window)'
%files %{python_files}
%license LICENSE
%doc CHANGELOG.rst README.rst
%{python_sitelib}/*
%{python_sitelib}/pytestqt
%{python_sitelib}/pytest_qt-%{version}-py*.egg-info
%changelog

View File

@ -1,12 +0,0 @@
Index: pytest-qt-3.2.1/tests/test_basics.py
===================================================================
--- pytest-qt-3.2.1.orig/tests/test_basics.py
+++ pytest-qt-3.2.1/tests/test_basics.py
@@ -84,6 +84,7 @@ def test_stop_for_interaction(qtbot, tim
@pytest.mark.parametrize("show", [True, False])
@pytest.mark.parametrize("method_name", ["waitExposed", "waitActive"])
+@pytest.mark.skip(reason="Fails in OBS randomly")
def test_wait_window(show, method_name, qtbot):
"""
Using one of the wait-widget methods should not raise anything if the widget