From 4e2efc801a8c7f925793f6ed79856fe0dfce45c9 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Wed, 25 Dec 2024 06:45:06 -0500 Subject: [PATCH] fix:add test zadd + sort --- test/test_mixins/test_zadd.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_mixins/test_zadd.py b/test/test_mixins/test_zadd.py index e50c4666..0688c44a 100644 --- a/test/test_mixins/test_zadd.py +++ b/test/test_mixins/test_zadd.py @@ -3,11 +3,20 @@ import redis.client from packaging.version import Version +from test import testtools from test.testtools import raw_command REDIS_VERSION = Version(redis.__version__) +def test_zadd_roman(r: redis.Redis): + testtools.raw_command(r, "ZADD", "b", "0", "c") + with pytest.raises(redis.ResponseError) as ctx: + testtools.raw_command(r, "SORT", "b") + + assert str(ctx.value) == "One or more scores can't be converted into double" + + def test_zadd(r: redis.Redis): r.zadd("foo", {"four": 4}) r.zadd("foo", {"three": 3})