Deselect tests incompatible with the latest virtualenv

This commit is contained in:
Lumir Balhar 2020-06-16 14:10:10 +02:00
parent 230ac9caa8
commit acf982e208

View File

@ -18,7 +18,7 @@ Name: python-%{srcname}
# When updating, update the bundled libraries versions bellow! # When updating, update the bundled libraries versions bellow!
# You can use vendor_meta.sh in the dist git repo # You can use vendor_meta.sh in the dist git repo
Version: %{base_version}%{?prerel:~%{prerel}} Version: %{base_version}%{?prerel:~%{prerel}}
Release: 3%{?dist} Release: 4%{?dist}
Summary: A tool for installing and managing Python packages Summary: A tool for installing and managing Python packages
# We bundle a lot of libraries with pip, which itself is under MIT license. # We bundle a lot of libraries with pip, which itself is under MIT license.
@ -348,17 +348,29 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
# test_config_file_venv_option # test_config_file_venv_option
# TODO investigate failures # TODO investigate failures
# test_uninstall_non_local_distutils # test_uninstall_non_local_distutils
# Incompatible with the latest virtualenv
# test_from_link_vcs_with_source_dir_obtains_commit_id
# test_from_link_vcs_without_source_dir
# test_should_cache_git_sha
pytest_k='not completion and pytest_k='not completion and
not test_pep517_and_build_options and not test_pep517_and_build_options and
not test_config_file_venv_option and not test_config_file_venv_option and
not test_uninstall_non_local_distutils' not test_uninstall_non_local_distutils and
not test_from_link_vcs_with_source_dir_obtains_commit_id and
not test_from_link_vcs_without_source_dir and
not test_should_cache_git_sha'
mkdir _bin mkdir _bin
export PATH="$PWD/_bin:$PATH" export PATH="$PWD/_bin:$PATH"
export PYTHONPATH=%{buildroot}%{python3_sitelib} export PYTHONPATH=%{buildroot}%{python3_sitelib}
ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" # --deselect'ed tests are not compatible with the latest virtualenv
# These files contain almost 500 tests so we should enable them back
# as soon as pip will be compatible upstream
# https://github.com/pypa/pip/pull/8441
%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" \
--deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py
%endif %endif
@ -394,6 +406,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
%{python_wheeldir}/%{python_wheelname} %{python_wheeldir}/%{python_wheelname}
%changelog %changelog
* Tue Jun 16 2020 Lumír Balhar <lbalhar@redhat.com> - 20.1.1-4
- Deselect tests incompatible with the latest virtualenv
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 20.1.1-3 * Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 20.1.1-3
- Rebuilt for Python 3.9 - Rebuilt for Python 3.9