Skip to content

Commit 70eb871

Browse files
authored
Merge pull request #194 from Kakadus/main
tests: use `sorted(...)` instead of `.sort()`
2 parents cf12aae + 3bb7ba0 commit 70eb871

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/test_asyncio/test_cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,7 @@ async def test_init_slots_dynamic_startup_nodes(self, dynamic_startup_nodes):
26202620
]
26212621
startup_nodes = list(rc.nodes_manager.startup_nodes.keys())
26222622
if dynamic_startup_nodes is True:
2623-
assert startup_nodes.sort() == discovered_nodes.sort()
2623+
assert sorted(startup_nodes) == sorted(discovered_nodes)
26242624
else:
26252625
assert startup_nodes == ["my@DNS.com:7000"]
26262626

tests/test_asyncio/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ async def test_tags(decoded_r: valkey.Valkey):
827827
assert 1 == res.total
828828

829829
q2 = await decoded_r.ft().tagvals("tags")
830-
assert (tags.split(",") + tags2.split(",")).sort() == q2.sort()
830+
assert sorted(tags.split(",") + tags2.split(",")) == sorted(q2)
831831
else:
832832
res = await decoded_r.ft().search(q)
833833
assert 1 == res["total_results"]

tests/test_cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2815,7 +2815,7 @@ def test_init_slots_dynamic_startup_nodes(self, dynamic_startup_nodes):
28152815
]
28162816
startup_nodes = list(rc.nodes_manager.startup_nodes.keys())
28172817
if dynamic_startup_nodes is True:
2818-
assert startup_nodes.sort() == discovered_nodes.sort()
2818+
assert sorted(startup_nodes) == sorted(discovered_nodes)
28192819
else:
28202820
assert startup_nodes == ["my@DNS.com:7000"]
28212821

0 commit comments

Comments
 (0)