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

Method test_record_slice

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

Source from the content-addressed store, hash-verified

102 Record({'spam': 123}, (1,))['spam']
103
104 def test_record_slice(self):
105 r = Record(R_ABC, (1, 2, 3))
106 self.assertEqual(r[:], (1, 2, 3))
107 self.assertEqual(r[:1], (1,))
108 self.assertEqual(r[::-1], (3, 2, 1))
109 self.assertEqual(r[::-2], (3, 1))
110 self.assertEqual(r[1:2], (2,))
111 self.assertEqual(r[2:2], ())
112
113 def test_record_immutable(self):
114 r = Record(R_A, (42,))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected