Run tests during the package build
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 0.0.8
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Tox plugin to run tests in current Python environment
|
||||
|
||||
License: MIT
|
||||
@@ -14,6 +14,13 @@ BuildArch: noarch
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
# test dependencies extracted from tox.ini
|
||||
# TODO use [tests] extra with the next release
|
||||
# https://github.com/fedora-python/tox-current-env/pull/53
|
||||
BuildRequires: python%{python3_pkgversion}-packaging
|
||||
BuildRequires: python%{python3_pkgversion}-pytest
|
||||
BuildRequires: python%{python3_pkgversion}-pytest-xdist
|
||||
|
||||
%description
|
||||
The tox-current-env plugin allows to run tests in current Python environment.
|
||||
|
||||
@@ -45,11 +52,11 @@ The tox-current-env plugin allows to run tests in current Python environment.
|
||||
|
||||
|
||||
%check
|
||||
# the tests currently only work within actual tox and with various Python
|
||||
# versions installed, so we skip them and do an import check only instead.
|
||||
# hooks[34].py are imported in hooks.py based on tox version so we have to
|
||||
# exclude them here.
|
||||
%pyproject_check_import -e '*.hooks?'
|
||||
# deselected tests run tox without the options for this plugin and hence they need internet
|
||||
%pytest -k "not regular and not noquiet_installed_packages[None]"
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
|
||||
@@ -57,6 +64,9 @@ The tox-current-env plugin allows to run tests in current Python environment.
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Dec 07 2022 Miro Hrončok <mhroncok@redhat.com> - 0.0.8-4
|
||||
- Run tests during the package build
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.8-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
||||
Reference in New Issue
Block a user