Skip to content

tests: use sorted(...) instead of .sort() #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_asyncio/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2620,7 +2620,7 @@ async def test_init_slots_dynamic_startup_nodes(self, dynamic_startup_nodes):
]
startup_nodes = list(rc.nodes_manager.startup_nodes.keys())
if dynamic_startup_nodes is True:
assert startup_nodes.sort() == discovered_nodes.sort()
assert sorted(startup_nodes) == sorted(discovered_nodes)
else:
assert startup_nodes == ["my@DNS.com:7000"]

Expand Down
2 changes: 1 addition & 1 deletion tests/test_asyncio/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ async def test_tags(decoded_r: valkey.Valkey):
assert 1 == res.total

q2 = await decoded_r.ft().tagvals("tags")
assert (tags.split(",") + tags2.split(",")).sort() == q2.sort()
assert sorted(tags.split(",") + tags2.split(",")) == sorted(q2)
else:
res = await decoded_r.ft().search(q)
assert 1 == res["total_results"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ def test_init_slots_dynamic_startup_nodes(self, dynamic_startup_nodes):
]
startup_nodes = list(rc.nodes_manager.startup_nodes.keys())
if dynamic_startup_nodes is True:
assert startup_nodes.sort() == discovered_nodes.sort()
assert sorted(startup_nodes) == sorted(discovered_nodes)
else:
assert startup_nodes == ["my@DNS.com:7000"]

Expand Down