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