| 1656 | await r.getex("a", ex=0, px=1) |
| 1657 | |
| 1658 | async def test_get_set_bit(self, r: redis.Redis): |
| 1659 | # no value |
| 1660 | assert not await r.getbit("a", 5) |
| 1661 | # set bit 5 |
| 1662 | assert not await r.setbit("a", 5, True) |
| 1663 | assert await r.getbit("a", 5) |
| 1664 | # unset bit 4 |
| 1665 | assert not await r.setbit("a", 4, False) |
| 1666 | assert not await r.getbit("a", 4) |
| 1667 | # set bit 4 |
| 1668 | assert not await r.setbit("a", 4, True) |
| 1669 | assert await r.getbit("a", 4) |
| 1670 | # set bit 5 again |
| 1671 | assert await r.setbit("a", 5, True) |
| 1672 | assert await r.getbit("a", 5) |
| 1673 | |
| 1674 | async def test_getrange(self, r: redis.Redis): |
| 1675 | await r.set("a", "foo") |