From 00033c1c024abc8575344401d8d37b1f556bf338d63cc1ac62f01704af01a6cb Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 30 Jun 2025 17:18:57 +0000 Subject: [PATCH] - Added test_add_elem_no_quant.patch to fix test on 32 bit archs. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-redis?expand=0&rev=104 --- python-redis.changes | 6 +++++- python-redis.spec | 2 ++ test_add_elem_no_quant.patch | 24 ++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 test_add_elem_no_quant.patch diff --git a/python-redis.changes b/python-redis.changes index d25e656..2c9f22f 100644 --- a/python-redis.changes +++ b/python-redis.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 30 16:54:24 UTC 2025 - Илья Индиго + +- Added test_add_elem_no_quant.patch to fix test on 32 bit archs. + ------------------------------------------------------------------- Thu Jun 12 10:24:11 UTC 2025 - Daniel Garcia @@ -1458,4 +1463,3 @@ Fri Apr 15 12:43:07 UTC 2011 - saschpe@suse.de Sun Mar 7 22:27:15 UTC 2010 - prusnak@suse.cz - Created package - diff --git a/python-redis.spec b/python-redis.spec index eaca72e..a7c7e64 100644 --- a/python-redis.spec +++ b/python-redis.spec @@ -37,6 +37,7 @@ URL: https://github.com/redis/redis-py Source0: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz Patch0: increase-test-timeout.patch Patch1: remove-mock.patch +Patch2: test_add_elem_no_quant.patch BuildRequires: %{python_module async-timeout >= 4.0.2 if %python-base < 3.11.3} BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module hatchling} @@ -71,6 +72,7 @@ The Python interface to the Redis key-value store. %patch -P 0 -p1 %endif %patch -P 1 -p1 +%patch -P 2 -p1 # These tests pass locally but fail in obs with different # environment, like ALP build... diff --git a/test_add_elem_no_quant.patch b/test_add_elem_no_quant.patch new file mode 100644 index 0000000..f28ab11 --- /dev/null +++ b/test_add_elem_no_quant.patch @@ -0,0 +1,24 @@ +diff -Pdpru redis-py-6.2.0.orig/tests/test_asyncio/test_vsets.py redis-py-6.2.0/tests/test_asyncio/test_vsets.py +--- redis-py-6.2.0.orig/tests/test_asyncio/test_vsets.py 2025-05-27 19:21:45.000000000 +0300 ++++ redis-py-6.2.0/tests/test_asyncio/test_vsets.py 2025-06-30 18:35:24.108629200 +0300 +@@ -83,7 +83,7 @@ async def test_add_elem_no_quant(d_clien + assert resp == 1 + + emb = await d_client.vset().vemb("myset", "elem1") +- assert _validate_quantization(float_array, emb, tolerance=0.0) ++ assert _validate_quantization(float_array, emb, tolerance=0.00001) + + + @skip_if_server_version_lt("7.9.0") +diff -Pdpru redis-py-6.2.0.orig/tests/test_vsets.py redis-py-6.2.0/tests/test_vsets.py +--- redis-py-6.2.0.orig/tests/test_vsets.py 2025-05-27 19:21:45.000000000 +0300 ++++ redis-py-6.2.0/tests/test_vsets.py 2025-06-30 18:35:03.140295444 +0300 +@@ -87,7 +87,7 @@ def test_add_elem_no_quant(d_client): + assert resp == 1 + + emb = d_client.vset().vemb("myset", "elem1") +- assert _validate_quantization(float_array, emb, tolerance=0.0) ++ assert _validate_quantization(float_array, emb, tolerance=0.00001) + + + @skip_if_server_version_lt("7.9.0")