- Add pytest_register_mark.patch to make the test suite at least

syntactically correct. Unfortunately, it is still broken
  gh#pyudev/pyudev#404.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=35
This commit is contained in:
Matej Cepl 2020-10-08 23:03:46 +00:00 committed by Git OBS Bridge
parent 850c503204
commit c0ee678bc4
3 changed files with 26 additions and 7 deletions

View File

@ -0,0 +1,9 @@
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,3 +1,5 @@
-[tool:pytest]
+[pytest]
# do not search for tests in build directory
norecursedirs = .* _* build
+markers =
+ conversion

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Oct 8 23:03:04 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add pytest_register_mark.patch to make the test suite at least
syntactically correct. Unfortunately, it is still broken
gh#pyudev/pyudev#404.
-------------------------------------------------------------------
Fri Feb 28 21:38:51 UTC 2020 - Dirk Mueller <dmueller@suse.com>

View File

@ -17,7 +17,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with test
Name: python-pyudev
Version: 0.22.0
Release: 0
@ -26,6 +25,9 @@ License: LGPL-2.1-or-later
Group: Development/Libraries/Python
URL: http://pyudev.readthedocs.org/
Source0: https://files.pythonhosted.org/packages/source/p/pyudev/pyudev-%{version}.tar.gz
# PATCH-FIX-UPSTREAM pytest_register_mark.patch bsc#[0-9]+ mcepl@suse.com
# Add missing mark registration
Patch0: pytest_register_mark.patch
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
@ -35,13 +37,14 @@ BuildRequires: pkgconfig(libudev)
Requires: libudev1
Requires: python-six
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pylint}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
%endif
BuildRequires: %{python_module yapf}
%ifpython2
# pyudev was last used in KDE:Unstable:Playground (pyudev-0.8)
Provides: pyudev = %{version}
@ -54,7 +57,8 @@ A Python binding to libudev, the hardware management library and service found
in modern linux systems.
%prep
%setup -q -n pyudev-%{version}
%autosetup -p1 -n pyudev-%{version}
# Disable intersphinx and issuetracker, we don't want to access the web during doc build:
sed -i -e "s|'sphinx.ext.intersphinx',\\?||" -e "s|'sphinxcontrib.issuetracker',\\?||" doc/conf.py
@ -65,10 +69,9 @@ sed -i -e "s|'sphinx.ext.intersphinx',\\?||" -e "s|'sphinxcontrib.issuetracker',
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_expand nosetests-%{$python_bin_suffix}
%endif
# Test suite fails gh#pyudev/pyudev#404
%pytest || true
%files %{python_files}
%license COPYING