(self)
| 5463 | self._check_reduce(proto, obj, listitems=list(obj)) |
| 5464 | |
| 5465 | def test_special_method_lookup(self): |
| 5466 | protocols = range(pickle.HIGHEST_PROTOCOL + 1) |
| 5467 | class Picky: |
| 5468 | def __getstate__(self): |
| 5469 | return {} |
| 5470 | |
| 5471 | def __getattr__(self, attr): |
| 5472 | if attr in ("__getnewargs__", "__getnewargs_ex__"): |
| 5473 | raise AssertionError(attr) |
| 5474 | return None |
| 5475 | for protocol in protocols: |
| 5476 | state = {} if protocol >= 2 else None |
| 5477 | self._check_reduce(protocol, Picky(), state=state) |
| 5478 | |
| 5479 | def _assert_is_copy(self, obj, objcopy, msg=None): |
| 5480 | """Utility method to verify if two objects are copies of each others. |
nothing calls this directly
no test coverage detected