[issue44052] patch object as argument should be explicit
Pierre Ossman
report at bugs.python.org
Thu May 6 07:46:48 EDT 2021
Pierre Ossman <ossman at cendio.se> added the comment:
I've always been cautious about running patch() manually since it was easy to miss the cleanup. But those fears might be irrelevant these days when we have addCleanup().
Still, decorators are a more robust in more complex setups since you don't have to worry about setUp() being properly called in every base class. So I still think this would be interesting.
A different function might be an option to avoid adding arguments. Just like there are a few special patch.*() already.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44052>
_______________________________________
More information about the Python-bugs-list
mailing list