Run tests by pytest, not by tox, there is no tox.ini

From https://koji.fedoraproject.org/koji/buildinfo?buildID=1080862

    + tox
    GLOB sdist-make: /builddir/build/BUILD/distro-1.3.0/setup.py
    python create: /builddir/build/BUILD/distro-1.3.0/.tox/python
    python inst: /builddir/build/BUILD/distro-1.3.0/.tox/dist/distro-1.3.0.zip
    python installed: distro==1.3.0
    python runtests: PYTHONHASHSEED='426311755'
    ___________________________________ summary ____________________________________
      python: commands succeeded
      congratulations :)
    + exit 0
This commit is contained in:
Miro Hrončok 2018-05-29 19:37:22 +02:00
parent ddddeed049
commit c8b8fdb0df

View File

@ -7,7 +7,7 @@
Name: python-%{pypi_name}
Version: 1.3.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Linux Distribution - a Linux OS platform information API
License: ASL 2.0
@ -37,16 +37,14 @@ Summary: %{summary}
BuildRequires: python2-devel
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-setuptools
BuildRequires: pytest
%else
BuildRequires: python2-setuptools
BuildRequires: python2-pytest
%endif
%if 0%{?fedora}
Suggests: /usr/bin/lsb_release
%endif
%if %{with python3}
#for tests
BuildRequires: python3-tox
%endif
%description -n python2-%{pypi_name} %{_description}
@ -58,6 +56,7 @@ Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
%if 0%{?fedora}
Suggests: /usr/bin/lsb_release
%endif
@ -102,11 +101,15 @@ rm -rf %{pypi_name}.egg-info
%{_bindir}/distro
%check
%{__python2} -m pytest tests -v
%if %{with python3}
tox
%{__python3} -m pytest tests -v
%endif
%changelog
* Tue May 29 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-2
- run tests by pytest, not by tox, there is no tox.ini
* Thu May 10 2018 Miroslav Suchý <msuchy@redhat.com> 1.3.0-1
- rebase to distro 1.3.0