Skip to content
Open
Changes from 1 commit
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: 2 additions & 0 deletions mockredis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,8 @@ def _translate_range(self, len_, start, end):
"""
Translate range to valid bounds.
"""
start = int(start)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test to cover this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tester for client.py translation functions.
See comment about general test failure below.

end = int(end)
if start < 0:
start += len_
start = max(0, min(start, len_))
Expand Down