[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-10-11 Thread Max Rothman
Max Rothman added the comment: Hi, I'd like to wrap this ticket up and get some kind of resolution, whether it's accepted or not. I'm new to the Python community, what's the right way to prompt a discussion about this sort of thing? Should I have taken it to one of the mailing lists? ---

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-18 Thread Max Rothman
Max Rothman added the comment: Hi, just wanted to ping this again and see if there was any movement. -- ___ Python tracker ___ ___ Pyt

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-12 Thread Max Rothman
Max Rothman added the comment: > Generally the called with asserts can only be used to match the *actual > call*, and they don't determine "equivalence". That's fair, but as unittest.mock stands now, it *does* check equivalence, but only partially, which is more confusing to users than either

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-11 Thread Michael Foord
Michael Foord added the comment: Generally the called with asserts can only be used to match the *actual call*, and they don't determine "equivalence". To do it cleanly would be tricky, and adding complex code is a maintenance burden. I'm not convinced there's a massive use case - generally y

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: No need to spend time making a PR until there is a decision about whether this is something we want to do. -- assignee: -> michael.foord nosy: +rhettinger ___ Python tracker _

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-06-30 Thread Max Rothman
Max Rothman added the comment: I'd be happy to look at submitting a patch for this, but it'd be helpful to be able to ask questions of someone more familiar with unittest.mock's code. -- ___ Python tracker ___

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-06-30 Thread Max Rothman
New submission from Max Rothman: For a function f with the signature f(foo=None), the following three calls are equivalent: f(None) f(foo=None) f() However, only the first two are equivalent in the eyes of unittest.mock.Mock.assert_called_with: >>> with patch('__main__.f', autospec=True) as