Migrate tests to tox rhbz#2019409

This commit is contained in:
Steve Traylen 2022-01-28 09:03:37 +00:00
commit f2e4b53fd3
2 changed files with 32 additions and 7 deletions

View file

@ -4,13 +4,16 @@
Name: python-%{pypi_name}
Version: 1.4.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: A mocking library for requests
License: ASL 2.0
URL: https://github.com/patrys/httmock
Source0: https://files.pythonhosted.org/packages/source/h/httmock/httmock-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/patrys/httmock/%{version}/tests.py
# Add a tox file.
# https://bugzilla.redhat.com/show_bug.cgi?id=2019409
Patch0: https://patch-diff.githubusercontent.com/raw/patrys/httmock/pull/64.diff
BuildArch: noarch
%description
@ -20,18 +23,18 @@ that use requests internally.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3dist(requests) >= 1
%generate_buildrequires
%pyproject_buildrequires -t
%description -n python3-%{pypi_name}
A mocking library for requests for Python.
You can use it to mock third-party APIs and test libraries
that use requests internally.
%prep
%autosetup -n %{pypi_name}-%{version}
%autosetup -p1 -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
cp %{SOURCE1} .
@ -43,7 +46,7 @@ cp %{SOURCE1} .
%py3_install
%check
%{__python3} setup.py test
%{tox}
%files -n python3-%{pypi_name}
%license LICENSE
@ -53,6 +56,9 @@ cp %{SOURCE1} .
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%changelog
* Fri Jan 28 2022 Steve Traylen <steve.traylen@cern.ch> 1.4.0-5
- Migrate tests to tox rhbz#2019409
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild