[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-12 Thread Chris Withers
Change by Chris Withers : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think we can close this as not a bug. I don't think we need to add boolean return value of True if the assert statements are True since it's never meant to be used. I would wait for others opinion on this. -- nosy: +cjw296, lisroach,

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: assert_called_once is supposed to raise an AssertionError if the mock is not called and to return None like other assert_* helpers. The return value is not supposed to be used and it's more of an assertion action where if it's None then it's

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-10 Thread Troulet-lambert Odile
New submission from Troulet-lambert Odile : Using a mock with side_effect, I would expect that assert_called_once returns True if the mock has been called. Yet it returns None while call_count== 1 returns True. If this is not a bug, I would welcome some explanation in the documentation.