Re: Feature proposal: unittest.mock.NAN

2024-01-24 Thread Barry Scott via Python-list
Python ideas are discussed here these days: https://discuss.python.org/ Suggest you raise this there in the Ideas category. Barry > On 24 Jan 2024, at 17:11, Kerrick Staley via Python-list > wrote: > > I think we should define a unittest.mock.NAN constant that can be used with > Mock.assert_c

Feature proposal: unittest.mock.NAN

2024-01-24 Thread Kerrick Staley via Python-list
I think we should define a unittest.mock.NAN constant that can be used with Mock.assert_called_with() to assert that an argument passed to a Mock was NaN. NaNs are special in that math.nan != math.nan, so you can't just do assert_called_with(math.nan). The naming is meant to parallel unittest.mock.