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
___
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
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
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
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
___
___
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
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