Add conditional for running all tests

This commit is contained in:
Sandro 2023-11-08 21:56:45 +01:00
parent 22e04783b2
commit 46aede5dbe
No known key found for this signature in database
GPG Key ID: 68D0FF74FE9F382A

View File

@ -5,6 +5,9 @@
%bcond_without check
%endif
# Enable all tests (requires check to be true)
%bcond all_tests 0
Name: python-argcomplete
Summary: Bash tab completion for argparse
Version: 3.1.4
@ -71,6 +74,9 @@ install -Dp -m0644 argcomplete/bash_completion.d/_%{name} %{buildroot}%{_sysconf
%if %{with check}
%check
%if %{with all_tests}
%{py3_test_envvars} %{python3} test/test.py -v
%else
# Disable zsh tests. They fail for mysterious reasons.
# https://github.com/kislyuk/argcomplete/issues/447
%{py3_test_envvars} %{python3} test/test.py -v -k "TestArgcomplete"
@ -78,6 +84,7 @@ install -Dp -m0644 argcomplete/bash_completion.d/_%{name} %{buildroot}%{_sysconf
%{py3_test_envvars} %{python3} test/test.py -v -k "TestCheckModule"
%{py3_test_envvars} %{python3} test/test.py -v -k "TestSplitLine"
%endif
%endif
%files -n python3-argcomplete -f %{pyproject_files}
%license LICENSE.rst