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