Issue 7055: Automatic test___all__ - Python tracker (original) (raw)

Created on 2009-10-04 16:45 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_all.patch pitrou,2009-10-04 17:46
Messages (9)
msg93548 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-04 16:45
This patch replaces the explicit list of modules in test___all__ with an automatic detection of modules having a __all__ attribute, so that we don't forget any. It doesn't really appear to slow things down; test___all__ only takes one second here.
msg93549 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-10-04 17:17
Hey, I was doing that too! :)
msg93552 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-04 17:46
There was a problem with os.environ (from distutils and CGIHTTPServer) changes disturbing test_wsgiref, so I've added an unconditional save/restore of os.environ in test.regrtest.
msg93554 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-04 19:16
For os.environ, wouldn't it be better to fix the tests so that they don't disturb the environment? Even if the CGIHTTPServer legitimately modifies the environment, shouldn't it be the responsibility of its test suite to wrap it so that the environment isn't modified when the tests are done? What _would_ be good, IMO, would be if regrtest would check for modifications and complain. Then we wouldn't have to wait until another test was impacted by the bad test to catch it.
msg93556 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-04 19:38
You are right, such an approach would be better. I don't really want to mess with test_distutils, however, and I was looking for a reliable fix to the problem.
msg93559 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-04 20:02
Hmm. Maybe we could fix it _and_ complain.
msg93827 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2009-10-10 12:41
I'm glad someone with more roundtuits than I had the same idea after the logging error in 2.6.3 :) The regrtest change isn't needed any more since RDM checked that concept in separately - the test update itself looks fine though (and applies and runs cleanly on the trunk).
msg93844 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-10 21:27
Committed in r75312, r75314. I'm not sure this should be backported to 2.6 and 3.1 (although it might be useful).
msg94556 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-27 13:09
Finally backported to 2.6 (r75751) and 3.1 (r75752).
History
Date User Action Args
2022-04-11 14:56:53 admin set github: 51304
2009-10-27 13:09:34 pitrou set messages: +
2009-10-10 21:27:18 pitrou set status: open -> closedresolution: fixedmessages: +
2009-10-10 12:41:31 ncoghlan set nosy: + ncoghlanmessages: +
2009-10-04 20:02:44 r.david.murray set messages: +
2009-10-04 19:38:35 pitrou set messages: +
2009-10-04 19:16:20 r.david.murray set nosy: + r.david.murraymessages: +
2009-10-04 17:47:51 pitrou set files: - test_all.patch
2009-10-04 17:46:37 pitrou set files: + test_all.patchmessages: +
2009-10-04 17:17:16 georg.brandl set messages: +
2009-10-04 16:45:33 pitrou set files: + test_all.patchkeywords: + patch
2009-10-04 16:45:10 pitrou create