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

Method test_record_get_invalid_args

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

Source from the content-addressed store, hash-verified

289 self.assertEqual(r.get('nonexistent', 'default'), 'default')
290
291 def test_record_get_invalid_args(self):
292 r = Record(R_AB, (42, 43))
293 with self.checkref(r):
294 with self.assertRaises(TypeError):
295 r.get()
296 with self.assertRaises(TypeError):
297 r.get('a', 2, 3)
298 with self.assertRaises(TypeError):
299 r.get(default=2)
300
301 def test_record_not_pickleable(self):
302 r = Record(R_A, (42,))

Callers

nothing calls this directly

Calls 2

checkrefMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected