Verify that basic Redis instances have auto_close_connection_pool set to True
(request, from_url)
| 534 | |
| 535 | @pytest.mark.parametrize("from_url", (True, False), ids=("from_url", "from_args")) |
| 536 | async def test_pool_auto_close(request, from_url): |
| 537 | """Verify that basic Redis instances have auto_close_connection_pool set to True""" |
| 538 | |
| 539 | url: str = request.config.getoption("--redis-url") |
| 540 | url_args = parse_url(url) |
| 541 | |
| 542 | async def get_redis_connection(): |
| 543 | if from_url: |
| 544 | return Redis.from_url(url) |
| 545 | return Redis(**url_args) |
| 546 | |
| 547 | r1 = await get_redis_connection() |
| 548 | assert r1.auto_close_connection_pool is True |
| 549 | await r1.aclose() |
| 550 | |
| 551 | |
| 552 | async def test_close_is_aclose(request): |
nothing calls this directly
no test coverage detected