[issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list`

2022-04-03 Thread himkt
himkt added the comment: > It only need to wrap an argument when it is a singular value. It is also wrong..., sorry. To compare a single value, I should have passed a tuple of tuples. ``` > python d

[issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list`

2022-04-03 Thread himkt
himkt added the comment: So sorry, documentation is not wrong. It only need to wrap an argument when it is a singular value. But I'm still wondering if we can unify documentation to wrap `call` (e.g. https://github.com/himkt/cpython/blob/main/Doc/library/unittest.mock-examples.rst#checking

[issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list`

2022-04-03 Thread himkt
New submission from himkt : Currently documentation says we can check call_args_list by providing a list of tuples of arguments. ``` >>> expected = [(), ((3, 4),), ({'key': 'fish', 'next': 'w00t!'},)] >>> mock.call_args_list == expected True ``` (from https://docs.pytho