From 64a2e1896c5ddbb5600f3f2a75979627a5cad7d3f11b7727a9c168e9d638d526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 17 Aug 2020 06:24:15 +0000 Subject: [PATCH] Accepting request 827025 from home:jayvdb:py-submit Replace nose with pytest OBS-URL: https://build.opensuse.org/request/show/827025 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=23 --- python-elasticsearch.changes | 7 +++++++ python-elasticsearch.spec | 23 +++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/python-elasticsearch.changes b/python-elasticsearch.changes index 8677ae3..3895f7d 100644 --- a/python-elasticsearch.changes +++ b/python-elasticsearch.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Aug 16 12:33:29 UTC 2020 - John Vandenberg + +- Replace nose with pytest +- Remove %bcond_without test +- Tidy spec + ------------------------------------------------------------------- Mon Apr 6 07:52:26 UTC 2020 - Marketa Calabkova diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec index 6014664..1b65d39 100644 --- a/python-elasticsearch.spec +++ b/python-elasticsearch.spec @@ -17,7 +17,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without test Name: python-elasticsearch Version: 7.6.0 Release: 0 @@ -26,22 +25,19 @@ License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/elastic/elasticsearch-py Source: https://github.com/elastic/elasticsearch-py/archive/%{version}.tar.gz +BuildRequires: %{python_module certifi} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module pyaml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests >= 2.0.0} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module urllib3 >= 1.21.1} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-certifi Requires: python-urllib3 >= 1.21.1 BuildArch: noarch -%if %{with test} -BuildRequires: %{python_module certifi} -BuildRequires: %{python_module coverage} -BuildRequires: %{python_module mock} -BuildRequires: %{python_module nosexcover} -BuildRequires: %{python_module nose} -BuildRequires: %{python_module pyaml} -BuildRequires: %{python_module requests >= 2.0.0} -BuildRequires: %{python_module urllib3 >= 1.21.1} -%endif %python_subpackages %description @@ -52,6 +48,7 @@ to be opinion-free and very extendable. %prep %setup -q -n elasticsearch-py-%{version} rm README.rst +sed -i 's/from nose.plugins.skip import SkipTest/from unittest import SkipTest/' test_elasticsearch/test_helpers.py %build %python_build @@ -60,10 +57,8 @@ rm README.rst %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check -%python_expand nosetests-%{$python_bin_suffix} -%endif +%pytest -rs %files %{python_files} %license LICENSE