Enable tests properly (this is pytest, not unittest)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distro?expand=0&rev=11
This commit is contained in:
parent
bb5874f9c1
commit
1e406ccb9d
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 13 16:52:25 UTC 2018 - mcepl@suse.com
|
||||||
|
|
||||||
|
- Enable tests properly (this is pytest, not unittest),
|
||||||
|
it is necessary to explicitly set locale to an Unicode one
|
||||||
|
(https://github.com/nir0s/distro/issues/223)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 10 09:42:51 UTC 2018 - sebix+novell.com@sebix.at
|
Thu May 10 09:42:51 UTC 2018 - sebix+novell.com@sebix.at
|
||||||
|
|
||||||
|
@ -25,18 +25,19 @@ Release: 0
|
|||||||
Summary: Linux Distribution - a Linux OS platform information API
|
Summary: Linux Distribution - a Linux OS platform information API
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/nir0s/distro
|
URL: https://github.com/nir0s/distro
|
||||||
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module devel}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildArch: noarch
|
||||||
# SECTION test
|
# SECTION test
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module flake8}
|
||||||
|
BuildRequires: %{python_module pytest-cov}
|
||||||
|
BuildRequires: %{python_module pytest-runner}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
%endif
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -55,11 +56,12 @@ It is a renewed alternative implementation for Python's original platform.linux_
|
|||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
%python_exec setup.py test
|
# Explicit settings of locale is necessary
|
||||||
|
# https://github.com/nir0s/distro/issues/223
|
||||||
|
LANG=en_US.utf8 %python_exec setup.py pytest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc CHANGELOG.md README.md README.rst
|
%doc CHANGELOG.md README.md README.rst
|
||||||
%python3_only %{_bindir}/distro
|
%python3_only %{_bindir}/distro
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user