Skip to content

Commit b4fcbaa

Browse files
Catch a known DeprecationWarning when calling .close() (#3335)
Co-authored-by: Vladyslav Vildanov <[email protected]>
1 parent 93b9d85 commit b4fcbaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_asyncio/test_cluster.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ async def mock_aclose():
313313
called += 1
314314

315315
with mock.patch.object(cluster, "aclose", mock_aclose):
316-
await cluster.close()
316+
with pytest.warns(DeprecationWarning, match=r"Use aclose\(\) instead"):
317+
await cluster.close()
317318
assert called == 1
318319
await cluster.aclose()
319320

0 commit comments

Comments
 (0)