From b4b0ff3dc15bd7a8ab9abb6b3217727c69145fa48882876f65160eb77f59acc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 28 Aug 2018 14:25:43 +0000 Subject: [PATCH] - Run tests by launching redis server - Require redis on runtime OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-redis?expand=0&rev=28 --- python-redis.changes | 6 ++++++ python-redis.spec | 25 ++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/python-redis.changes b/python-redis.changes index 752cee0..2b5f16b 100644 --- a/python-redis.changes +++ b/python-redis.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 28 14:25:18 UTC 2018 - tchvatal@suse.com + +- Run tests by launching redis server +- Require redis on runtime + ------------------------------------------------------------------- Tue Oct 3 01:23:23 UTC 2017 - arun@gmx.de diff --git a/python-redis.spec b/python-redis.spec index 3d1432d..d33154a 100644 --- a/python-redis.spec +++ b/python-redis.spec @@ -1,7 +1,7 @@ # # spec file for package python-redis # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,19 +20,21 @@ Name: python-redis Version: 2.10.6 Release: 0 -Url: http://github.com/andymccurdy/redis-py Summary: Python client for Redis key-value store License: MIT Group: Development/Languages/Python -Source: https://pypi.io/packages/source/r/redis/redis-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{python_module devel} +URL: http://github.com/andymccurdy/redis-py +Source: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz +BuildRequires: %{python_module mock} +BuildRequires: %{python_module pytest >= 2.5.0} BuildRequires: %{python_module py} BuildRequires: fdupes +BuildRequires: psmisc BuildRequires: python-rpm-macros +BuildRequires: redis Requires: python-py +Requires: redis BuildArch: noarch - %python_subpackages %description @@ -48,9 +50,14 @@ The Python interface to the Redis key-value store. %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%files %python_files -%defattr(-,root,root,-) -%doc CHANGES LICENSE README.rst +%check +%{_sbindir}/redis-server --port 6379 & +%python_exec setup.py test +killall redis-server + +%files %{python_files} +%license LICENSE +%doc CHANGES README.rst %{python_sitelib}/* %changelog