[issue11664] Add patch method to unittest.TestCase

Karthikeyan Singaravelan report at bugs.python.org
Wed Sep 11 04:12:03 EDT 2019


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

I concur with Raymond here. Since mock is also part of stdlib and this issue predates mock being merged to stdlib. I think adding it to unittest sort of expands the unittest API being just an alias to mock.patch. mock.patch is used in lot of places and has a good adoption as plain function, decorator and context manager. This would also mean explaining people why there is mock.patch and TestCase.patch in docs too.

----------
nosy: +xtreak

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11664>
_______________________________________


More information about the Python-bugs-list mailing list