Skip to content
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

Make __getitem__ raise a KeyError for missing keys #192

Merged
merged 1 commit into from May 22, 2018

Conversation

dnoetzel
Copy link
Contributor

In redis-py, attempting to use getitem with a non-existent key
causes a KeyError to be raised, while fakeredis returns None. This
change makes it so that getitem in fakeredis works the same way as
in redis-py.

Fixes #191

In redis-py, attempting to use __getitem__ with a non-existent key
causes a KeyError to be raised, while fakeredis returns None. This
change makes it so that __getitem__ in fakeredis works the same way as
in redis-py.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 98.463% when pulling 56b1367 on dnoetzel:make-getitem-raise-keyerror into 8216b16 on jamesls:master.

1 similar comment
@coveralls
Copy link

coveralls commented May 22, 2018

Coverage Status

Coverage increased (+0.003%) to 98.463% when pulling 56b1367 on dnoetzel:make-getitem-raise-keyerror into 8216b16 on jamesls:master.

@bmerry
Copy link
Collaborator

bmerry commented May 22, 2018

Thanks, looks good!

@bmerry bmerry merged commit ebb36c1 into jamesls:master May 22, 2018
@dnoetzel dnoetzel deleted the make-getitem-raise-keyerror branch May 25, 2018 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants