[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2015-07-16 Thread John Allison
John Allison added the comment: That probably IS a joke. Why not fix the underlying issue instead? -- nosy: +John Allison ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21238 ___

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2015-07-13 Thread Kushal Das
Kushal Das added the comment: It is a typing mistake many people make. We just want to catch those as otherwise mock will silently pass those. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21238

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2015-07-13 Thread Dima Tisnek
Dima Tisnek added the comment: What is this **assret** spelling? I can't a reference to this spelling anywhere else in the codebase, let alone any docs other that this special kwarg. It seems intentional. Was that a joke? Or something I should know? -- nosy: +Dima.Tisnek

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2014-04-16 Thread Kushal Das
Kushal Das added the comment: Patch with docs and test changes. -- keywords: +patch Added file: http://bugs.python.org/file34912/issue21238.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21238

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2014-04-16 Thread Michael Foord
Michael Foord added the comment: It needs a NEWS entry, but looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21238 ___ ___

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2014-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset e4ee0b15cc4f by Kushal Das in branch 'default': Closes Issue 21238: New keyword argument `unsafe` to Mock. http://hg.python.org/cpython/rev/e4ee0b15cc4f -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2014-04-15 Thread Michael Foord
New submission from Michael Foord: A common problem with unittest.mock.Mock is to mistype an assert method. Because mocks create attributes on demand your test will pass without error. We should raise an AttributeError if you access any attribute name (that doesn't exist) starting with assert