This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients barry, belopolsky, benjamin.peterson, berker.peksag, brett.cannon, eric.araujo, erlendaasland, ezio.melotti, ghaering, gmwils, gpolo, michael.foord, ned.deily, r.david.murray, rhettinger, tarek, terry.reedy, theller, zach.ware
Date 2021-03-23.00:27:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616459245.95.0.230973585741.issue10572@roundup.psfhosted.org>
In-reply-to
Content
I added idlelib.idletest in May 2013 with the concurrence of Nick Coughlin, who also suggested 'idle_test' rather than just 'test'.  It currently has 72 files (66 test_xyz files for idlelib modules).

Foord's opening justification for moving package tests was "Having tests in Lib/test instead of inside the package makes it easier to grep the unittest package without grepping the tests."

I presume 'tests' refers to the unittest tests but I don't understand 'easier'.  Is recursive grepping really not optional for the grep he uses?  In any case, if Michael as package author preferred to put them in /Lib, fine.

Having package tests in the package makes it possible to grep both package code and tests together from an editor that allows searching all files in a single directory or tree.  IDLE's editor and Notepad++ are 2 examples and both have a recurse checkmark option off by default.  I routinely do both types of searches of idlelib from an IDLE editor.

I have never grepped Lib/test, but if others do, would symlinks work?

For optional packages like tkinter and idlelib, having the tests in the package means that tests are automatically omitted when the package is.  If they were moved, vendors wanting a clean test directory would have to write new code to omit or include package tests when the package is omitted or included.
History
Date User Action Args
2021-03-23 00:27:25terry.reedysetrecipients: + terry.reedy, barry, brett.cannon, theller, rhettinger, ghaering, belopolsky, benjamin.peterson, tarek, gpolo, ned.deily, ezio.melotti, eric.araujo, r.david.murray, michael.foord, berker.peksag, zach.ware, gmwils, erlendaasland
2021-03-23 00:27:25terry.reedysetmessageid: <1616459245.95.0.230973585741.issue10572@roundup.psfhosted.org>
2021-03-23 00:27:25terry.reedylinkissue10572 messages
2021-03-23 00:27:25terry.reedycreate