Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from happybits/bitpos
Browse files Browse the repository at this point in the history
bitpos works in later versions of redis-py
  • Loading branch information
Grokzen committed Aug 7, 2014
2 parents 04da5ec + 3aabd86 commit 6facf05
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,11 @@ def test_bitop_not_supported(self, r):
with pytest.raises(RedisClusterException):
r.bitop('not', 'r', 'a')

# TODO: this should raise a command blocked exception.
def test_bitpos_unsupported(self, r):
@pytest.mark.xfail(reason="older versions of redis-py don't support bitpos but the latest from github does")
def test_bitpos(self, r):
key = 'key:bitpos'
r.set(key, b('\xff\xf0\x00'))
with pytest.raises(AttributeError):
r.bitpos(key, 0)
assert(r.bitpos(key, 0) == 12)

def test_decr(self, r):
assert r.decr('a') == -1
Expand Down

0 comments on commit 6facf05

Please sign in to comment.