(self)
| 1788 | self.assertFalse(isinstance(self.con, list)) |
| 1789 | |
| 1790 | async def test_connection_use_after_close(self): |
| 1791 | def check(): |
| 1792 | return self.assertRaisesRegex(asyncpg.InterfaceError, |
| 1793 | 'connection is closed') |
| 1794 | |
| 1795 | await self.con.close() |
| 1796 | |
| 1797 | with check(): |
| 1798 | await self.con.add_listener('aaa', lambda: None) |
| 1799 | |
| 1800 | with check(): |
| 1801 | self.con.transaction() |
| 1802 | |
| 1803 | with check(): |
| 1804 | await self.con.executemany('SELECT 1', []) |
| 1805 | |
| 1806 | with check(): |
| 1807 | await self.con.set_type_codec('aaa', encoder=None, decoder=None) |
| 1808 | |
| 1809 | with check(): |
| 1810 | await self.con.set_builtin_type_codec('aaa', codec_name='aaa') |
| 1811 | |
| 1812 | for meth in ('execute', 'fetch', 'fetchval', 'fetchrow', |
| 1813 | 'prepare', 'cursor'): |
| 1814 | |
| 1815 | with check(): |
| 1816 | await getattr(self.con, meth)('SELECT 1') |
| 1817 | |
| 1818 | with check(): |
| 1819 | await self.con.reset() |
| 1820 | |
| 1821 | @unittest.skipIf(os.environ.get('PGHOST'), 'unmanaged cluster') |
| 1822 | async def test_connection_ssl_to_no_ssl_server(self): |
nothing calls this directly
no test coverage detected