From 68c4defaa6e6d7448186628bae5c71b0160e0854 Mon Sep 17 00:00:00 2001 From: Shuo Wang Date: Fri, 31 May 2024 14:19:01 +0800 Subject: [PATCH] enable %check Signed-off-by: Shuo Wang --- python-virtualenv.spec | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/python-virtualenv.spec b/python-virtualenv.spec index 807b922..cd4667b 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -1,9 +1,9 @@ -%bcond_with tests +%bcond_without tests Summary: Tool to create isolated Python environments Name: python-virtualenv Version: 20.21.1 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT URL: http://pypi.python.org/pypi/virtualenv @@ -18,7 +18,6 @@ BuildRequires: python3-devel python3-hatchling BuildRequires: python-pip-wheel python-setuptools-wheel python-wheel-wheel %if %{with tests} -BuildRequires: fish BuildRequires: gcc BuildRequires: python3-flaky BuildRequires: python3-packaging @@ -71,11 +70,33 @@ sed -i "s|/usr/share/python-wheels|%{python_wheel_dir}|" src/virtualenv/util/pat %if %{with tests} %check - +# bypass some tests due to requires fish +rm -f tests/conftest.py PIP_CERT=/etc/pki/tls/certs/ca-bundle.crt \ -%pytest -vv -k "not test_bundle and not test_acquire and not test_periodic_update and not test_wheel_ and not test_download_ and not test_base_bootstrap_via_pip_invoke and not test_seed_link_via_app_data" +%pytest \ + --ignore=tests/integration/test_zipapp.py \ + --ignore=tests/unit/activation/test_activate_this.py \ + --ignore=tests/unit/activation/test_bash.py \ + --ignore=tests/unit/activation/test_batch.py \ + --ignore=tests/unit/activation/test_csh.py \ + --ignore=tests/unit/activation/test_fish.py \ + --ignore=tests/unit/activation/test_nushell.py \ + --ignore=tests/unit/activation/test_powershell.py \ + --ignore=tests/unit/activation/test_python_activator.py \ + --ignore=tests/unit/config/test___main__.py \ + --ignore=tests/unit/create/test_creator.py \ + --ignore=tests/unit/create/via_global_ref/test_build_c_ext.py \ + --ignore=tests/unit/discovery/py_info/test_py_info.py \ + --ignore=tests/unit/discovery/py_info/test_py_info_exe_based_of.py \ + --ignore=tests/unit/discovery/test_discovery.py \ + --ignore=tests/unit/seed/embed/test_bootstrap_link_via_app_data.py \ + --ignore=tests/unit/seed/embed/test_pip_invoke.py \ + --ignore=tests/unit/seed/wheels/test_acquire.py \ + --ignore=tests/unit/seed/wheels/test_acquire_find_wheel.py \ + --ignore=tests/unit/seed/wheels/test_bundle.py \ + --ignore=tests/unit/seed/wheels/test_periodic_update.py \ + --ignore=tests/unit/seed/wheels/test_wheels_util.py -rm -r tmp_path %endif %files -n python3-virtualenv -f %{pyproject_files} @@ -85,6 +106,9 @@ rm -r tmp_path %changelog +* Fri May 31 2024 Shuo Wang - 20.21.1-2 +- enable %check + * Mon Sep 25 2023 Wang Guodong - 20.21.1-1 - Upgrade to version 20.21.1 -- Gitee