Skip to content

Commit

Permalink
fixup! fixup! Adapt to redis 3.*
Browse files Browse the repository at this point in the history
  • Loading branch information
em92 committed Aug 10, 2024
1 parent 32c483e commit 0914d7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- name: Start Redis
uses: superchargejs/[email protected]
- name: Install redis package
run: sudo python3 -m pip install redis==${{ matrix.redis-package-version }}
run: PIP_BREAK_SYSTEM_PACKAGES=1 sudo python3 -m pip install redis==${{ matrix.redis-package-version }}
- name: Run test
run: python3 -m unittest discover python/tests/
4 changes: 2 additions & 2 deletions python/minqlx/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def close(self):
Redis._pool = None

if redis.VERSION > (3,):
def lrem(self, name, value, count):
return self.r.lrem(name, count, value)
def lrem(self, name, count, value):
return self.r.lrem(name, value, count)

def setex(self, name, value, time):
return self.r.setex(name, time, value)
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_lrem_01(self):
"Dog",
"Buffalo",
)
c.lrem(key, "Cat", 2)
c.lrem(key, 2, "Cat")
result = c.lrange(key, 0, -1)
self.assertEqual(
result,
Expand Down

0 comments on commit 0914d7e

Please sign in to comment.