Python from Wise Guy's Viewpoint

Lex Spoon lex at cc.gatech.edu
Thu Oct 30 18:22:18 EST 2003


Pascal Costanza <costanza at web.de> writes:
> ...and it requires you to go to all the places where they are defined.
>
> Yes, I know the answer: "But they should be all in one place." No,
> they shouldn't need to be all in one place. For example, I might want
> to place test code close to the definitions that they test. Or I might
> want to organize them according to some other criteria.
>
> No, it's not hard to find them all, then. I can use grep or my IDE to
> find them. But that's still more work than just commenting them
> out. If I seldomly need to find all test cases, I can trade locality
> of all test cases for some other possible advantages.


With a good IDE, "distance" should be the same as "semantic nearness",
if that term makes sense.  In a good IDE, there already is an existing
way to browse all the tests, or it is easy to extend the IDE to allow
it.  So things are in the "same place" whenever they have a semantic
attribute that the tools can index on.  No matter how you layout
tests, there is sure to be a way for a decent IDE to show you all the
tests.


-Lex




More information about the Python-list mailing list