[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch
Dave McNulla added the comment: I understand. It's a thing I often forget in python that some parameters are passed by value while others are passed by reference (language for parameters I remember from C class about 30 years ago). I do not think I would have caught that with docs, unless you start putting them in Stack Overflow! I'm only sort of kidding. I think you can close this bug. Thanks for the clarification, Dave -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue45305> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch
New submission from Dave McNulla : https://gist.github.com/dmcnulla/ecec8fc96a2fd07082f240eeff6888d9 I'm trying to reproduce an error in a call to a method, forcing a second call to the method. In my test, the call_args_list is showing incorrectly (both in debugging or running unittest normally). I am not certain what other circumstances this is happening or not happening. I was able to reduce the code to reproduce it quite a bit. I am certain that the first call to the method is not matching correctly in my criteria to what I expect based on my debugging. I am using python 3.7. I can reproduce in IntelliJ or by commandline `python3 -m pytest test_multiple_side_effect.py` -- components: Tests messages: 402743 nosy: dmcnulla priority: normal severity: normal status: open title: Incorrect record of call_args_list when using multiple side_effect in mock.patch versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue45305> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com