Enable most of the tests in %check
This commit is contained in:
parent
82235d4efa
commit
f3b44339db
@ -1,5 +1,5 @@
|
||||
%bcond_with bootstrap
|
||||
%bcond_with tests
|
||||
%bcond_without tests
|
||||
|
||||
%bcond_without python2
|
||||
%bcond_without doc
|
||||
@ -60,8 +60,9 @@ Source0: %pypi_source
|
||||
BuildArch: noarch
|
||||
|
||||
%if %{with tests}
|
||||
BuildRequires: git
|
||||
BuildRequires: bzr
|
||||
BuildRequires: /usr/bin/git
|
||||
BuildRequires: /usr/bin/bzr
|
||||
BuildRequires: /usr/bin/svn
|
||||
%endif
|
||||
|
||||
# to get tests:
|
||||
@ -387,10 +388,24 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
||||
%if %{with tests}
|
||||
%check
|
||||
export PYTHONPATH=src
|
||||
|
||||
mkdir _bin
|
||||
export PATH="$PWD/_bin:$PATH"
|
||||
|
||||
|
||||
# bash completion tests only work from installed package
|
||||
# test_yaml_based, test_uninstall_non_local_distutils, test_venv_modification, test_freeze_git_clone_srcdir are failing TODO investigate
|
||||
# other deselected tests download setuptools and wheel from the interwebs and are not marked as network
|
||||
%global pytest_k 'not completion and not test_pep518 and not test_install_with_target_and_scripts_no_warning and not test_install_incompatible_python_requires and not test_install_compatible_python_requires and not test_wheel_exit_status_code_when_no_requirements and not test_wheel_exit_status_code_when_blank_requirements_file and not test_constraints_local_editable_install_pep518 and not test_constraints_local_editable_install_pep518 and not test_wheel_exit_status_code_when_blank_requirements_file and not test_yaml_based and not test_uninstall_non_local_distutils and not test_venv_modification and not test_freeze_git_clone_srcdir and not test_upgrade_argparse_shadowed'
|
||||
|
||||
%if %{with python2}
|
||||
%{__python2} -m pytest -m 'not network'
|
||||
ln -s %{buildroot}%{_bindir}/pip2 _bin/pip
|
||||
%{__python2} -m pytest -m 'not network' -k %{pytest_k}
|
||||
%endif
|
||||
%{__python3} -m pytest -m 'not network'
|
||||
|
||||
|
||||
ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
|
||||
%{__python3} -m pytest -m 'not network' -k %{pytest_k}
|
||||
%endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user