(op)
| 354 | ], |
| 355 | ) |
| 356 | def test_proxy_iop(op): |
| 357 | class Example: |
| 358 | value = 1 |
| 359 | |
| 360 | def fake_op(self, other): |
| 361 | self.value = other |
| 362 | return self |
| 363 | |
| 364 | __iadd__ = fake_op |
| 365 | __isub__ = fake_op |
| 366 | __imul__ = fake_op |
| 367 | __imatmul__ = fake_op |
| 368 | __itruediv__ = fake_op |
| 369 | __ifloordiv__ = fake_op |
| 370 | __imod__ = fake_op |
| 371 | __ipow__ = fake_op |
| 372 | __ilshift__ = fake_op |
| 373 | __irshift__ = fake_op |
| 374 | __iand__ = fake_op |
| 375 | __ior__ = fake_op |
| 376 | __ixor__ = fake_op |
| 377 | |
| 378 | ns, p = _make_proxy(Example()) |
| 379 | p_out = op(p, 2) |
| 380 | assert type(p_out) is local.LocalProxy |
| 381 | assert p.value == 2 |
| 382 | assert ns.value.value == 2 |
| 383 | |
| 384 | |
| 385 | def test_proxy_matmul(): |
nothing calls this directly
no test coverage detected