MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / test_no_explicit_close_no_debug

Method test_no_explicit_close_no_debug

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

Source from the content-addressed store, hash-verified

2847 gc.enable()
2848
2849 async def test_no_explicit_close_no_debug(self):
2850 olddebug = self.loop.get_debug()
2851 self.loop.set_debug(False)
2852 try:
2853 with self.assertWarnsRegex(
2854 ResourceWarning,
2855 r'unclosed connection.*run in asyncio debug'):
2856 await self._run_no_explicit_close_test()
2857 finally:
2858 self.loop.set_debug(olddebug)
2859
2860 async def test_no_explicit_close_with_debug(self):
2861 olddebug = self.loop.get_debug()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected