(self)
| 345 | self.assertEqual(operator.index(p), 10) |
| 346 | |
| 347 | def test_proxy_div(self): |
| 348 | class C: |
| 349 | def __floordiv__(self, other): |
| 350 | return 42 |
| 351 | def __ifloordiv__(self, other): |
| 352 | return 21 |
| 353 | o = C() |
| 354 | p = weakref.proxy(o) |
| 355 | self.assertEqual(p // 5, 42) |
| 356 | p //= 5 |
| 357 | self.assertEqual(p, 21) |
| 358 | |
| 359 | def test_proxy_matmul(self): |
| 360 | class C: |
nothing calls this directly
no test coverage detected