Message247194
So the problem with the testing-cabal issue 280 is *really* a problem with decorators - the decorator is applied at method creation time and mock_open is only called once rather than once *per call*.
Better would be to use mock.patch as a context manager inside the test, so that mock_open is (correctly) called each time.
From a purist point of view I think that the Python 3.5==mock 1.1.4 behaviour is *better*. Whether that's enough justification to break existing code is a difficult question. |
|
Date |
User |
Action |
Args |
2015-07-23 13:34:20 | michael.foord | set | recipients:
+ michael.foord, rbcollins, python-dev, quasipedia, berker.peksag, pkoning |
2015-07-23 13:34:20 | michael.foord | set | messageid: <1437658460.01.0.903172093701.issue21750@psf.upfronthosting.co.za> |
2015-07-23 13:34:19 | michael.foord | link | issue21750 messages |
2015-07-23 13:34:19 | michael.foord | create | |
|