[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-03-11 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-03-11 Thread Amit Saha
Amit Saha added the comment: Thank you Victor. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-03-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd75f8d34f97 by Victor Stinner in branch 'default': Add Mock.assert_called() https://hg.python.org/cpython/rev/bd75f8d34f97 -- nosy: +python-dev ___ Python tracker

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-03-11 Thread STINNER Victor
STINNER Victor added the comment: > Yes, this can go in. Cool. I pushed the latest patch of Amit Saha. I just modified assert_call() doc to add "at least once". Thanks Amit for your contribution! -- ___ Python tracker

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-03-11 Thread Michael Foord
Michael Foord added the comment: Yes, this can go in. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-24 Thread Amit Saha
Amit Saha added the comment: Thanks Michael, so looks like we are all set for merging this? -- ___ Python tracker ___

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-23 Thread STINNER Victor
STINNER Victor added the comment: > In the past I've rejected them because you can easily get it by asserting the > call count is non-zero and I want to avoid the proliferation of a thousand > assert methods Yeah, I understand that. IMHO having to check if a function was called is a common

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-23 Thread Michael Foord
Michael Foord added the comment: There have been persistent calls for an "assert_called" method over the lifetime of mock. In the past I've rejected them because you can easily get it by asserting the call count is non-zero and I want to avoid the proliferation of a thousand assert methods.

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> michael.foord ___ Python tracker ___

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-21 Thread Amit Saha
Amit Saha added the comment: Updated patch -- Added file: http://bugs.python.org/file41997/issue26323.patch ___ Python tracker ___

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-21 Thread STINNER Victor
STINNER Victor added the comment: The latest patch looks good to me, but I would prefer to have a review of the maintainer of the unittest.mock module (Michael Ford, voidspace?), or at least a second core developer. @Robert: Would you mind reviewing the latest patch please? --

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-21 Thread Amit Saha
Amit Saha added the comment: @haypo : Just a reminder request to please view the updated patch. -- nosy: +Amit Saha ___ Python tracker ___

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-18 Thread Amit Saha
Amit Saha added the comment: Updated patch with docs and addressed review comments. -- Added file: http://bugs.python.org/file41961/issue26323.patch ___ Python tracker

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-18 Thread Amit Saha
Changes by Amit Saha : -- title: Add a assert_called() method for mock objects -> Add assert_called() and assert_called_once() methods for mock objects ___ Python tracker