Run the tests
This commit is contained in:
parent
767ad756c6
commit
104027bdab
|
@ -1,5 +1,7 @@
|
|||
%global srcname aiohttp
|
||||
|
||||
%bcond_without tests
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 3.8.1
|
||||
Release: 2%{?dist}
|
||||
|
@ -34,6 +36,28 @@ BuildRequires: python3-devel
|
|||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-Cython
|
||||
|
||||
%if %{with tests}
|
||||
# Test machinery
|
||||
BuildRequires: python3dist(pytest)
|
||||
BuildRequires: python3dist(pytest-mock)
|
||||
# Test dependencies (some of which are runtime dependencies)
|
||||
BuildRequires: python3dist(aiosignal)
|
||||
BuildRequires: python3dist(async-generator)
|
||||
BuildRequires: python3dist(async-timeout)
|
||||
BuildRequires: python3dist(attrs)
|
||||
BuildRequires: python3dist(brotli)
|
||||
BuildRequires: python3dist(charset-normalizer)
|
||||
BuildRequires: python3dist(freezegun)
|
||||
BuildRequires: python3dist(frozenlist)
|
||||
BuildRequires: python3dist(gunicorn)
|
||||
BuildRequires: python3dist(multidict)
|
||||
# Not currently packaged:
|
||||
# BuildRequires: python3dist(proxy-py)
|
||||
BuildRequires: python3dist(re-assert)
|
||||
BuildRequires: python3dist(trustme)
|
||||
BuildRequires: python3dist(yarl)
|
||||
%endif
|
||||
|
||||
Recommends: python%{python3_version}dist(aiodns)
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
||||
|
@ -46,6 +70,8 @@ with middlewares and pluggable routing.
|
|||
%autosetup -p 1 -n %{srcname}-%{version}
|
||||
# Remove bundled llhttp
|
||||
rm -rvf vendor/llhttp
|
||||
# Disable test coverage reports
|
||||
sed -r -i '/--cov=/d' setup.cfg
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
@ -53,6 +79,14 @@ rm -rvf vendor/llhttp
|
|||
%install
|
||||
%py3_install
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
# test_proxy_functional.py requires python3dist(proxy-py)
|
||||
# test_client_session_timeout_zero requires DNS
|
||||
%pytest --ignore=tests/test_proxy_functional.py \
|
||||
-k 'not test_client_session_timeout_zero'
|
||||
%endif
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
%doc CHANGES.rst CONTRIBUTORS.txt README.rst
|
||||
%license LICENSE.txt
|
||||
|
@ -64,6 +98,7 @@ rm -rvf vendor/llhttp
|
|||
* Fri Dec 24 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 3.8.1-2
|
||||
- Stop disabling debug packages
|
||||
- Unbundle llhttp
|
||||
- Run the tests
|
||||
|
||||
* Wed Dec 01 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.8.1-1
|
||||
- Update to latest upstream release 3.8.1
|
||||
|
|
Loading…
Reference in New Issue