[opensource-dev] Questions about unit test for "hg policy"

Oz Linden (Scott Lawrence) oz at lindenlab.com
Tue Aug 16 16:22:36 PDT 2011


On 2011-08-16 17:25, Boroondas Gupte wrote:
> Heya Oz
>
> Thanks for making Bos' hg hooks public!
>
> I've looked at the unit test you've written for hg policy and have two 
> questions about it:
>
>  1. Is it by purpose that the return code isn't checked after the hg
>     policy invocation on line 23
>     <https://bitbucket.org/lindenlab/hg-tools/src/5ddf6f780503/tests/test-policies#cl-23>?
>

That was a bug... thanks.

>  1. On lines 75
>     <https://bitbucket.org/lindenlab/hg-tools/src/5ddf6f780503/tests/test-policies#cl-75>-77,
>     is there a reason why you use cp rather than mv? I think the
>     latter would avoid the need for the subsequent rm.
>

No particular reason, actually.   I don't really think about optimizing 
unit tests.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110816/6fe85511/attachment.htm 


More information about the opensource-dev mailing list