diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..62acb97 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,29 @@ +From b6c0140e17fb571906251e0fb300a52735427bf7 Mon Sep 17 00:00:00 2001 +From: Daniel M +Date: Fri, 27 Sep 2024 14:14:53 -0400 +Subject: [PATCH] fix:tests for redis 5.1.0 + +--- + test/test_asyncredis.py | 5 +-- + test/test_mixins/test_set_commands.py | 50 +++++++++++++++++---------- + 2 files changed, 35 insertions(+), 20 deletions(-) + +diff --git a/test/test_asyncredis.py b/test/test_asyncredis.py +index 9f623d38..c98bb515 100644 +--- a/test/test_asyncredis.py ++++ b/test/test_asyncredis.py +@@ -165,11 +165,12 @@ async def test_failed_script_error7(self, async_redis): + await async_redis.eval('return redis.call("ZCOUNT", KEYS[1])', 1, "foo") + + ++@fake_only + @testtools.run_test_if_redispy_ver("gte", "5.1") + async def test_repr_redis_51(async_redis: redis.asyncio.Redis): + assert re.fullmatch( +- r",db=0)>)>", ++ r",db=0\)>\)>", + repr(async_redis.connection_pool), + ) + diff --git a/python-fakeredis.changes b/python-fakeredis.changes index 7288a4b..f190899 100644 --- a/python-fakeredis.changes +++ b/python-fakeredis.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 8 16:14:14 UTC 2024 - Markéta Machová + +- Add upstream fix-tests.patch + ------------------------------------------------------------------- Wed Jul 31 02:16:56 UTC 2024 - Martin Schreiner diff --git a/python-fakeredis.spec b/python-fakeredis.spec index 9c52e0b..9a0acc6 100644 --- a/python-fakeredis.spec +++ b/python-fakeredis.spec @@ -24,6 +24,9 @@ Summary: Fake implementation of redis API for testing purposes License: BSD-3-Clause AND MIT URL: https://github.com/cunla/fakeredis-py Source: https://github.com/cunla/fakeredis-py/archive/refs/tags/v%{version}.tar.gz#/fakeredis-%{version}-gh.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/cunla/fakeredis-py/commit/b6c0140e17fb571906251e0fb300a52735427bf7 fix:tests for redis 5.1.0 +# there is a new version, but the update failed for me +Patch: fix-tests.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module poetry-core} @@ -35,8 +38,7 @@ Requires: python-typing_extensions >= 4.7 Suggests: python-lupa >= 1.14 BuildArch: noarch # SECTION test requirements -# technically requires hypothesis >= 6.56, but we don't have it yet -BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module hypothesis >= 6.56} BuildRequires: %{python_module pytest >= 7.1.2} BuildRequires: %{python_module pytest-asyncio >= 0.19.0} BuildRequires: %{python_module pytest-mock >= 3.7.0}