Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion tests/test_asyncio/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ async def mock_aclose():
called += 1

with mock.patch.object(cluster, "aclose", mock_aclose):
await cluster.close()
with pytest.deprecated_call():
await cluster.close()
assert called == 1
await cluster.aclose()

Expand Down
2 changes: 1 addition & 1 deletion tests/test_asyncio/test_cwe_404.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@ async def doit():

await asyncio.gather(*[doit() for _ in range(10)])
finally:
await r.close()
await r.aclose()
2 changes: 1 addition & 1 deletion valkey/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def connect(self):
# Use the passed function valkey_connect_func
(
await self.valkey_connect_func(self)
if asyncio.iscoroutinefunction(self.valkey_connect_func)
if inspect.iscoroutinefunction(self.valkey_connect_func)
else self.valkey_connect_func(self)
)
except ValkeyError:
Expand Down
Loading