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

Method _add_custom_codec

tests/test_introspection.py:56–64  ·  view source on GitHub ↗
(self, conn)

Source from the content-addressed store, hash-verified

54 self.loop.run_until_complete(self._add_custom_codec(self.con))
55
56 async def _add_custom_codec(self, conn):
57 # mess up with the codec - builtin introspection shouldn't be affected
58 await conn.set_type_codec(
59 "oid",
60 schema="pg_catalog",
61 encoder=lambda value: None,
62 decoder=lambda value: None,
63 format="text",
64 )
65
66 @tb.with_connection_options(database='asyncpg_intro_test')
67 async def test_introspection_on_large_db(self):

Callers 2

setUpMethod · 0.95

Calls 1

set_type_codecMethod · 0.80

Tested by

no test coverage detected