summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-04-13 11:28:52 -0700
committerGitHub <noreply@github.com>2020-04-13 11:28:52 -0700
commit1f857f0053606c23cb3f1abd794e3efbf6981e09 (patch)
tree93e0c39328e6d27c63adb71ae72ede21b065e4b9
parent0851c0db2b979c55f52a28eeb63bfa6898df8cb3 (diff)
downloadredis-py-1f857f0053606c23cb3f1abd794e3efbf6981e09.tar.gz
Remove unnecessary coerce to list (#1321)
sorted() takes any iterable and always returns a new list. No need to eagerly coerce to a list.
-rw-r--r--tests/test_commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 208b99b..5c29dd5 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -2656,7 +2656,7 @@ class TestBinarySave(object):
r.rpush(key, *value)
# check that KEYS returns all the keys as they are
- assert sorted(r.keys('*')) == sorted(list(iterkeys(mapping)))
+ assert sorted(r.keys('*')) == sorted(iterkeys(mapping))
# check that it is possible to get list content by key name
for key, value in iteritems(mapping):