[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch

2021-10-22 Thread Dave McNulla
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 yo

[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch

2021-10-22 Thread Andrei Kulakov
Change by Andrei Kulakov : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch

2021-10-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Dave: what seems to happen here is that mock correctly reporting to you that the object you passed to the mocked func is currently `{}`. What you probably expected it to be is to be equal to what it was at exact time when it was passed, i.e. before it was mo

[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch

2021-09-27 Thread Dave McNulla
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 normall