Message365200
Ah, I see, yes, the documentation is a bit inconsistent. What may make more sense for some magic methods is to call the underlying object and use the return value or raise any exception that occurs.
For example:
__bool__ return value is bool(mock._mock_wraps)
__int__ return value is int(mock._mock_wraps)
__lt__ return value is operator.lt(mock._mock_wraps, other)
This would take care of several of them and provide more consistent behavior with the wrapped object. |
|
Date |
User |
Action |
Args |
2020-03-28 03:55:16 | aviso | set | recipients:
+ aviso, rbcollins, cjw296, r.david.murray, michael.foord, pconnell, Darragh Bailey, lisroach, anthonypjshaw, mariocj89, xtreak, Amir |
2020-03-28 03:55:16 | aviso | set | messageid: <1585367716.37.0.028732170713.issue39966@roundup.psfhosted.org> |
2020-03-28 03:55:16 | aviso | link | issue39966 messages |
2020-03-28 03:55:15 | aviso | create | |
|