MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_unbound_methods

Method test_unbound_methods

Lib/test/test_genericalias.py:191–198  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 self.assertEqual(alias(iter((1, 2, 3))), t((1, 2, 3)))
190
191 def test_unbound_methods(self):
192 t = list[int]
193 a = t()
194 t.append(a, 'foo')
195 self.assertEqual(a, ['foo'])
196 x = t.__getitem__(a, 0)
197 self.assertEqual(x, 'foo')
198 self.assertEqual(t.__len__(a), 1)
199
200 def test_subclassing(self):
201 class C(list[int]):

Callers

nothing calls this directly

Calls 5

tFunction · 0.50
appendMethod · 0.45
assertEqualMethod · 0.45
__getitem__Method · 0.45
__len__Method · 0.45

Tested by

no test coverage detected