This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: MagickMock created by patсh annotation refuses to apply function side_effect at second time
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: r.david.murray, Сергей Варюхин
Priority: normal Keywords:

Created on 2016-10-21 02:06 by Сергей Варюхин, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test.py Сергей Варюхин, 2016-10-21 02:06
Messages (2)
msg279098 - (view) Author: Сергей Варюхин (Сергей Варюхин) Date: 2016-10-21 02:06
You can see example in test.py. It should fails with AssertionErorr if mock works as expected. But it not fails.
msg279126 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-10-21 13:39
Your test file only compiles the function definitions, it doesn't actually run any code.  If I convert it into a unittest, it works as expected.  If this is minimized example of code where you actually found a problem, I suspect there's something else wrong with the original code.
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72681
2016-10-21 13:39:46r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg279126

resolution: not a bug
2016-10-21 02:06:08Сергей Варюхинcreate