diff --git a/python-argcomplete.spec b/python-argcomplete.spec index a5d5069..080fe6d 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -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