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 rbcollins
Recipients asvetlov, azsorkin, ezio.melotti, giampaolo.rodola, gvanrossum, michael.foord, pconnell, pitrou, rbcollins, serhiy.storchaka
Date 2015-04-28.19:00:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430247648.36.0.875443917046.issue17908@psf.upfronthosting.co.za>
In-reply-to
Content
I'm going to disagree with michael and antoine here.

The *internals* should be clean and pluggable for sure, but this is actually a pretty common thing to try, so there's no reason to force it to only be done by external plugins.

Right now the way to plug this in has been complicated by the addition of module / class suites, which already perform extra work around individual tests, but in a non-introspectable / extensible fashion.

So you could add this as a hook to the loader (decorate each test with some new thing) and a CLI option to use that hook for a gc collect call.

Alternatively, we could face down the class/module stuff and rearrange it to be extensible (e.g. something along the lines of testresources internals - generic groups pre-post stuff) or via some interaction with TestResult.... but I really dislike using TestResult to control the run - I have a better layout mostly sketched in mind but haven't had time to formalise it.

So I recommend the TestLoader hook point - its well within the current responsibilities for it to do this, and I don't see any long term maintenance issues.
History
Date User Action Args
2015-04-28 19:00:48rbcollinssetrecipients: + rbcollins, gvanrossum, pitrou, giampaolo.rodola, ezio.melotti, michael.foord, asvetlov, serhiy.storchaka, pconnell, azsorkin
2015-04-28 19:00:48rbcollinssetmessageid: <1430247648.36.0.875443917046.issue17908@psf.upfronthosting.co.za>
2015-04-28 19:00:48rbcollinslinkissue17908 messages
2015-04-28 19:00:47rbcollinscreate