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

Method test_proxy_index

Lib/test/test_weakref.py:340–346  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

338 self.assertEqual(bytes(weakref.proxy(instance)), b"bytes")
339
340 def test_proxy_index(self):
341 class C:
342 def __index__(self):
343 return 10
344 o = C()
345 p = weakref.proxy(o)
346 self.assertEqual(operator.index(p), 10)
347
348 def test_proxy_div(self):
349 class C:

Callers

nothing calls this directly

Calls 4

proxyMethod · 0.80
CClass · 0.70
assertEqualMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected