Code review comment for lp:~yellow/zope.testing/fix-tests

Graham Binns (gmb) wrote :

On 21 June 2012 18:42, Gary Poster <email address hidden> wrote:
> (1) For get_real_stdout and friend, would you feel better and be able to remove that apologetic comment if the code looked like this instead?
> The advantage is that we are not doing anything at __init__ time, and everything seems a bit cleaner to me.  What do you think?

We tried that, and it doesn't work (or at least it doesn't work in the
case of the test that was causing the problem). The trouble is that if
we wait until call time to work out what get_real_stdout() is going to
return then we're relying on that happening before anything mucks
about with sys.__stdout__. Either way, we need to do _something_ at
init time to make this not fail in weird and wonderful ways
(particularly with anything that uses the doctest module, which pokes
something unholy onto sys.__stdout__).

> (2) For the new XXX in src/zope/testing/testrunner/ in which we disable the tests, please add a bug for the broken tests and mention the number.  I think it's worth following the usual practice.

Yes, I agree; I'll take care of that tomorrow if Brad doesn't do it first.

« Back to merge proposal