Message388878
A few more things:
Assertions on Mock-autospec'ed Mocks will silently pass since e.g. assert_called_once_with will now be mocked out. This may justify a more stringent stance on the pattern since it risks hiding real test failures.
One complicating factor with the implementation is that autospec'd objects may have children that are already Mocked out. Failing eagerly, however, would break cases where the child is never used (and consequently risk causing more friction than may be necessary) but failing only upon access of that child makes it trickier for the user to trace back to where the parent was mocked. |
|
Date |
User |
Action |
Args |
2021-03-16 20:44:24 | msuozzo | set | recipients:
+ msuozzo, gregory.p.smith, cjw296, michael.foord, lisroach, mariocj89, xtreak |
2021-03-16 20:44:24 | msuozzo | set | messageid: <1615927464.6.0.77303160672.issue43478@roundup.psfhosted.org> |
2021-03-16 20:44:24 | msuozzo | link | issue43478 messages |
2021-03-16 20:44:24 | msuozzo | create | |
|