[issue19645] decouple unittest assertions from the TestCase class
R. David Murray
report at bugs.python.org
Tue Jul 9 20:43:37 EDT 2019
R. David Murray <rdmurray at bitdance.com> added the comment:
"But - what are we solving for here?" I'll tell you what my fairly common use case is. Suppose I have some test infrastructure code, and I want to make some assertions in it. What I invariably end up doing is passing 'self' into the infrastructure method/class just so I can call the assert methods from it. I'd much rather be just calling the assertions, without carrying the whole test object around. It *works* to do that, but it bothers me every time I do it or read it in code, and it makes the infrastructure code needlessly more complicated and slightly harder to understand/read.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19645>
_______________________________________
More information about the Python-bugs-list
mailing list