import aiohttp

async def test_async_with_session(loop):
    async with aiohttp.ClientSession(loop=loop) as session:
        pass

    assert session.closed

@@ -1,18 +1,75 @@
-import aiohttp
+from contextlib import suppress%0A%0Aimport aiohttp%0Afrom aiohttp import web
 %0A%0Aas
@@ -207,8 +207,1017 @@
 .closed%0A
+%0A%0Aasync def test_close_resp_on_error_async_with_session(loop, test_server):%0A    async def handler(request):%0A        return web.Response()%0A%0A    app = web.Application(loop=loop)%0A    app.router.add_get('/', handler)%0A    server = await test_server(app)%0A%0A    async with aiohttp.ClientSession(loop=loop) as session:%0A        with suppress(RuntimeError):%0A            async with session.get(server.make_url('/')) as resp:%0A                resp.content.set_exception(RuntimeError())%0A                await resp.read()%0A%0A        assert len(session._connector._conns) == 0%0A%0A%0Aasync def test_release_resp_on_normal_exit_from_cm(loop, test_server):%0A    async def handler(request):%0A        return web.Response()%0A%0A    app = web.Application(loop=loop)%0A    app.router.add_get('/', handler)%0A    server = await test_server(app)%0A%0A    async with aiohttp.ClientSession(loop=loop) as session:%0A        async with session.get(server.make_url('/')) as resp:%0A            await resp.read()%0A%0A        assert len(session._connector._conns) == 1%0A

Add tests on closing connection by error