Message247535
Would it be possible to add the functions and *not* deprecate assert_ methods?
The existing solution is still acknowledged to be an incomplete solution. It is still possible to make other typos that result in unintentional non-assertions (it's also not entirely clear from the docs when one would want to set unsafe=True, though at least the default unsafe=False is better). I'm not against the existing solution--I think it's reasonable and that calls of "special cases yadda yadda" are unfair. Sometimes practicality beats purity.
So, although adding assert_ functions would be a bit redundant, it's also guaranteed safer, and so probably worth making an exception for.
There's a tradeoff here between convenience and robustness and I think we can have it both ways. If I were to write new tests using Mock I would probably define such functions myself, but that would get repetitive quickly. |
|
Date |
User |
Action |
Args |
2015-07-28 18:20:39 | erik.bray | set | recipients:
+ erik.bray, brett.cannon, rbcollins, carljm, michael.foord, poke, bignose, berker.peksag, kushal.das, ztane, fov, kevinbenton |
2015-07-28 18:20:38 | erik.bray | set | messageid: <1438107638.96.0.699216661408.issue24651@psf.upfronthosting.co.za> |
2015-07-28 18:20:38 | erik.bray | link | issue24651 messages |
2015-07-28 18:20:38 | erik.bray | create | |
|