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

Method test_record_contains

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

Source from the content-addressed store, hash-verified

219 self.assertIn(r4, d)
220
221 def test_record_contains(self):
222 r = Record(R_AB, (42, 43))
223 self.assertIn('a', r)
224 self.assertIn('b', r)
225 self.assertNotIn('z', r)
226
227 r = Record(None, (42, 43))
228 self.assertNotIn('a', r)
229
230 with self.assertRaises(TypeError):
231 type(r).__contains__(None, 'a')
232
233 def test_record_cmp(self):
234 AB = collections.namedtuple('AB', ('a', 'b'))

Callers

nothing calls this directly

Calls 1

__contains__Method · 0.80

Tested by

no test coverage detected