Skip to content

Commit

Permalink
fix:add test zadd + sort
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Dec 25, 2024
1 parent 8954157 commit 4e2efc8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_mixins/test_zadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 4e2efc8

Please sign in to comment.