MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / test_no_explicit_close_no_debug

Method test_no_explicit_close_no_debug

tests/test_connect.py:2268–2277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2266 gc.enable()
2267
2268 async def test_no_explicit_close_no_debug(self):
2269 olddebug = self.loop.get_debug()
2270 self.loop.set_debug(False)
2271 try:
2272 with self.assertWarnsRegex(
2273 ResourceWarning,
2274 r'unclosed connection.*run in asyncio debug'):
2275 await self._run_no_explicit_close_test()
2276 finally:
2277 self.loop.set_debug(olddebug)
2278
2279 async def test_no_explicit_close_with_debug(self):
2280 olddebug = self.loop.get_debug()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected