[RFC] support for plugins to implement their own log formatters
John Arbash Meinel
john at arbash-meinel.com
Sun Feb 12 22:32:08 GMT 2006
Erik Bågfors wrote:
...
>
> Absolutely true. I moved between calling it "log_formatter" and
> "log_format" and forgot one place.
>
>> Otherwise, I like the idea that we can have plugins register new log
>> formatters. And the code is relatively clean. +1 if you add tests, and
>> fix the bug.
>
> thanks.
>
> Then to my next question. How do I test this thing. I can't really
> test a plugin that registers a log format because test_plugins.py
> states that we can't test plugins. I don't know how to test the
> --log-format option, and I can't find any test of --line or --short.
> I already have tests to show that the default log format is read
> correctly from bazaar.conf. (in test_config.py)
>
> Any help with this is appreciated.
>
> /Erik
>
A blackbox test would be sufficient. You make 2 commits, and then you
check the output of "bzr log --log-format=XXX".
Look in "bzrlib/tests/test_log.py" it should give a basic idea. (we
should be testing for --line, and --short).
But mostly I want you to write a test that forces the code with the bug
to be run. So that a bug doesn't show up there again.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060212/289afeef/attachment.pgp
More information about the bazaar
mailing list