From 46aede5dbed0cb03a165ce890f578e2faa1db666 Mon Sep 17 00:00:00 2001 From: Sandro Date: Wed, 8 Nov 2023 21:56:45 +0100 Subject: [PATCH] Add conditional for running all tests --- python-argcomplete.spec | 7 +++++++ 1 file changed, 7 insertions(+) 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