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

Method test_proxy_unicode

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

Source from the content-addressed store, hash-verified

327 self.assertEqual(L3[2:5], p3[2:5])
328
329 def test_proxy_unicode(self):
330 # See bug 5037
331 class C(object):
332 def __str__(self):
333 return "string"
334 def __bytes__(self):
335 return b"bytes"
336 instance = C()
337 self.assertIn("__bytes__", dir(weakref.proxy(instance)))
338 self.assertEqual(bytes(weakref.proxy(instance)), b"bytes")
339
340 def test_proxy_index(self):
341 class C:

Callers

nothing calls this directly

Calls 5

dirFunction · 0.85
assertInMethod · 0.80
proxyMethod · 0.80
CClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected