Re: [Checkins] SVN: zope.testing/trunk/ - fix test failure on Python 2.4 because of slight difference in the way

Benji York <[email protected]>
Newsgroups gmane.comp.web.zope.zope3.cvs
Message-ID <[email protected]>
On Fri, Apr 17, 2009 at 6:44 PM, Christian Theune <[email protected]> wrote:
> On Mon, 2009-04-13 at 11:43 -0400, Benji York wrote:
>> Log message for revision 99151:
>>   - fix test failure on Python 2.4 because of slight difference in the way
>>     coverage is reported (__init__ files with only a single comment line are now
>>     not reported)
>>   - fixed bug that caused the test runner to hang when running subprocesses (as a
>>     result Python 2.3 is no longer supported).
>
> Ah, great. I was working towards a fix as well, but hadn't had time to
> fix that. For me this only appeared on 2.5, not 2.4, same for you?

It happened with 2.6 for me.  I believe the cause was deprecation
warnings confusing the (rather brittle) stderr parsing.

> Something that I also see: the output of subprocesses is only displayed
> after the subprocess finished which also gives the impression of hangs
> also it just takes time.

Yep, that was a side-effect of changing the subprocess output parsing
from "online" to "offline".

>> +# unfortunately there is a zope.testing.testrunner.subprocess module that we
>> +# need to avoid; also, we want to support Python 2.4, which doesn't have
>> +# # from __future__ import absolute_import, so we use a hack instead
>> +import imp
>> +subprocess = imp.load_module('subprocess', *imp.find_module('subprocess'))
>> +
>
> I found that as well. I would also be happy to rename the local
> subprocess module as it's really an implementation detail.

That'd be fine with me.
-- 
Benji York
Senior Software Engineer
Zope Corporation
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.