MCPcopy
hub / github.com/MagicStack/asyncpg / test_record_get

Method test_record_get

tests/test_record.py:284–289  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

282 [r1, r2, r3, r6, r7, r4, r5])
283
284 def test_record_get(self):
285 r = Record(R_AB, (42, 43))
286 with self.checkref(r):
287 self.assertEqual(r.get('a'), 42)
288 self.assertEqual(r.get('nonexistent'), None)
289 self.assertEqual(r.get('nonexistent', 'default'), 'default')
290
291 def test_record_not_pickleable(self):
292 r = Record(R_A, (42,))

Callers

nothing calls this directly

Calls 2

checkrefMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected