[issue11664] Add patch method to unittest.TestCase

Éric Araujo report at bugs.python.org
Wed Sep 19 16:46:55 CEST 2012


Éric Araujo added the comment:

A data point: at work I follow Pyramid testing guidelines which tell you not to import code under test at module level, but in your test functions, so that if you have an error your tests do start and you see the error under the test method.  This means that I use mock.patch and not mock.patch.object, as my modules are not imported.

----------

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


More information about the Python-bugs-list mailing list