Accepting request 1062543 from devel:languages:python

- switch to run tests with pytest 
- build with all python flavors for SLE 15 SP4+

OBS-URL: https://build.opensuse.org/request/show/1062543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests-mock?expand=0&rev=20
This commit is contained in:
Dominique Leuenberger 2023-02-03 21:04:33 +00:00 committed by Git OBS Bridge
commit 62a83c36af
2 changed files with 9 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 1 20:37:16 UTC 2023 - Dirk Müller <dmueller@suse.com>
- switch to run tests with pytest
- build with all python flavors for SLE 15 SP4+
-------------------------------------------------------------------
Sat Jan 7 22:55:58 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -28,15 +28,12 @@ Patch0: remove-mock.patch
BuildRequires: %{python_module fixtures}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module purl}
BuildRequires: %{python_module purl}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.3}
BuildRequires: %{python_module requests-futures}
BuildRequires: %{python_module six}
BuildRequires: %{python_module testrepository >= 0.0.18}
BuildRequires: %{python_module testtools}
BuildRequires: python-rpm-macros
%if 0%{suse_version} >= 1550
%if 0%{suse_version} >= 1550 || (0%{?suse_version} == 1500 && 0%{?sle_version} >= 154000)
BuildRequires: %{python_module dbm}
%else
BuildRequires: python3-dbm
@ -65,19 +62,11 @@ You should checkout the docs for more information.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest tests/pytest
mv .testr.conf .testr.conf.orig
%{python_expand # first line can't be empty
rm -rf .testrepository
sed 's/python /$python /' .testr.conf.orig >| .testr.conf
testr init
testr run --parallel
}
%pytest tests
%files %{python_files}
%license LICENSE
%doc AUTHORS README.rst ChangeLog
%{python_sitelib}/*
%{python_sitelib}/requests_mock*
%changelog