Skip to content

Commit

Permalink
remove more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Sep 3, 2024
1 parent 858b637 commit c84e97b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/fakeredis/test/test_sortedset_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@
import pytest
import redis
import redis.client
from packaging.version import Version

REDIS_VERSION = Version(redis.__version__)


def round_str(x):
assert isinstance(x, bytes)
return round(float(x))


def zincrby(r, key, amount, value):
return r.zincrby(key, amount, value)


def test_zpopmin(r: redis.Redis):
r.zadd("foo", {"one": 1})
r.zadd("foo", {"two": 2})
Expand Down Expand Up @@ -215,14 +208,14 @@ def test_zcount_wrong_type(r: redis.Redis):

def test_zincrby(r: redis.Redis):
r.zadd("foo", {"one": 1})
assert zincrby(r, "foo", 10, "one") == 11
assert r.zincrby("foo", 10, "one") == 11
assert r.zrange("foo", 0, -1, withscores=True) == [(b"one", 11)]


def test_zincrby_wrong_type(r: redis.Redis):
r.sadd("foo", "bar")
with pytest.raises(redis.ResponseError):
zincrby(r, "foo", 10, "one")
r.zincrby("foo", 10, "one")


def test_zrange_descending(r: redis.Redis):
Expand Down

0 comments on commit c84e97b

Please sign in to comment.