help needed: bzr 2.1.0b4, scmproj tests: NotImplementedError: SilentUIFactory doesn't support make_output_stream

Alexander Belchenko bialix at ukr.net
Wed Dec 23 15:34:57 GMT 2009


John Arbash Meinel пишет:
> Alexander Belchenko wrote:
>> https://bugs.launchpad.net/bzr/+bug/499757
>>
> ....
> 
>>   File "bzrlib\ui\__init__.pyo", line 149, in make_output_stream
>>   File "bzrlib\ui\__init__.pyo", line 154, in _make_output_stream_explicit
>> NotImplementedError: SilentUIFactory doesn't support make_output_stream
>>
>>
>> It works from command-line though.
>>
>> What should I change in my tests to conform new bzr API?
> 
> There is currently an open debate for what SilentUIFactory should do
> when it is requested to 'make_output_stream'. It will either:
> 1) Open a connection to stdout
> 2) Silently discard the data put into the stream
> 
> Mostly likely it will be (1), and we just need to update the code to do so.
> 
> I think the issue you are running into is that you are calling 'run_bzr'
> without going through the test suite helpers that set up the output
> files, etc.

I'm calling run_bzr indirectly in the tests via executing my real commands.

> As such, you have the default UIFactory set up (Silent).
> This doesn't happen in the real-world or via TestCase.run_bzr, so we
> didn't catch it before now.

I can't use TestCase.run_bzr because it's a sort of blackbox test.

> I believe mwhudson also commented on this being an issue with some of
> his tests failing.
> 
> Summary:
>  We need to make SilentUIFactory.make_output_stream do the same thing as
>  TextUIFactory.make_output_stream.

Thanks, I'll add your comment to my bug report.




More information about the bazaar mailing list