Skip to content

Commit

Permalink
Enabled sort_ro tests only in Valkey > 7.0.0 for transaction mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
GilboaAWS committed Jun 6, 2024
1 parent 6503943 commit 3288515
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions python/python/tests/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,14 @@ async def transaction_test(
alpha=True,
)
args.append(["2", "3", "4", "a"])
transaction.sort_ro(
key17,
limit=Limit(1, 4),
order=OrderBy.ASC,
alpha=True,
)
args.append(["2", "3", "4", "a"])
if not await check_if_server_version_lt(redis_client, "7.0.0"):
transaction.sort_ro(
key17,
limit=Limit(1, 4),
order=OrderBy.ASC,
alpha=True,
)
args.append(["2", "3", "4", "a"])
transaction.sort_store(
key17,
key18,
Expand Down Expand Up @@ -541,13 +542,6 @@ async def test_standalone_transaction(self, redis_client: RedisClient):
order=OrderBy.ASC,
alpha=True,
)
transaction.sort_ro(
key1,
by_pattern="user:*->age",
get_patterns=["user:*->name"],
order=OrderBy.ASC,
alpha=True,
)
transaction.sort_store(
key1,
"newSortedKey",
Expand All @@ -564,17 +558,16 @@ async def test_standalone_transaction(self, redis_client: RedisClient):
assert isinstance(result[0], str)
assert "# Memory" in result[0]
assert result[1:4] == [OK, OK, value]
assert result[4:12] == [
assert result[4:11] == [
2,
2,
2,
["Bob", "Alice"],
["Bob", "Alice"],
2,
OK,
None,
]
assert result[12:] == expected
assert result[11:] == expected

def test_transaction_clear(self):
transaction = Transaction()
Expand Down

0 comments on commit 3288515

Please sign in to comment.