add %check

This commit is contained in:
Luna D Dragon 2024-05-23 13:28:00 +05:30
parent 30ad9613d9
commit e15d7ba134
Signed by: ldragon
GPG Key ID: 6802F1FD55460C17

View File

@ -52,6 +52,13 @@ Use current environment instead of virtualenv for tox testenvs
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# hooks[34].py are imported in hooks.py based on tox version so we have to
# exclude them here.
%pyproject_check_import -e '*.hooks?'
%if %{with tests}
# deselected tests run tox without the options for this plugin and hence they need internet
%pytest -k "not regular and not noquiet_installed_packages[None]"
%endif
%files %{python_files}
%doc README.rst