[issue40129] Add test classes for custom __index__, __int__, __float__ and __complex__

Raymond Hettinger report at bugs.python.org
Tue Mar 31 18:33:29 EDT 2020


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

I don't think this makes the world better.  It just makes it more intertwined.  Currently, I can read the test code in isolation and understand it.  But with the proposed PR, a person now needs to know more of what is in test_support.  I really like seeing the classes in-line so I know exactly what they are doing and exactly what a test is doing. 

Also, I don't like reinventing another alternative to mocks.  Ideally, we want to minimize the number of things a person has to know in order to read and write our tests.

I understand your desire to factor everything you see, but in so doing you're creating tighter coupling and increasing complexity for the everyday contributor.

----------
nosy: +rhettinger

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


More information about the Python-bugs-list mailing list