[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-dev
Subject:    Re: [Python-Dev] cpython: removed spurious output
From:       Georg Brandl <g.brandl () gmx ! net>
Date:       2011-05-30 17:31:43
Message-ID: is0k9o$2s8$1 () dough ! gmane ! org
[Download RAW message or body]

On 30.05.2011 19:13, Tarek Ziadé wrote:
> On Mon, May 30, 2011 at 7:04 PM, Georg Brandl <g.brandl@gmx.net> wrote:
>> On 30.05.2011 17:54, Terry Reedy wrote:
>>>
>>>
>>> On 5/30/2011 6:25 AM, tarek.ziade wrote:
>>>
>>> Should not old_out be sys.stderr, since that is what you over-write and
>>> 'restore'?
>>>
>>>> +        old_out = sys.stdout
>>>> +        sys.stderr = StringIO()
>>>> +        try:
>>>> +            dist = self.run_setup('install_dist', '--prefix=' + self.root_dir)
>>>> +        finally:
>>>> +            sys.sterr = old_out
>>
>> And even more importantly, shouldn't this be "sys.stderr" instead of "sys..sterr"?
> 
> Yes,
> 
>>
>> Really, what happened to testing before you push?
> 
> I did test it, before and after my push, sir.
> 
> This was not to fix a test bug, but to avoid a spurious output in the tests.

Well, I assumed changing sys.stderr would be noticed as changing the execution
environment.

But as I've now found out, the test class itself cleans up sys.stderr, so you
couldn't have noticed the bug.  I apologize.

Georg

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic