[MERGE] Prevent knit corruption by checking parents
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 22 15:29:05 BST 2006
Aaron Bentley wrote:
> Andrew Bennetts wrote:
>>> On Thu, Sep 21, 2006 at 12:30:50PM -0400, Aaron Bentley wrote:
>
>>>> Aaron Bentley wrote:
>>>>
>>>>> This patch causes a KnitTextsDiffer exception to be raised when knits
>>>>> disagree about the content of a parent.
>>>> Updated so that KnitTextsDiffer is a printable exception...
>>>
>>> Perhaps add a test for it to test_errors? Adding a short test for each new
>>> error there is probably a good thing to do.
>
> I'd rather make it easier than that. Perhaps we could get assertRaises
> to also ensure the raised exception is printable.
>
> Aaron
As I said in the past, I'd like to see a better helper than assertRaises
that would let you check that the text matched something that you expected.
Because if you had done $(version)s, it would still be printable, it
just wouldn't have contained what you thought it did.
It also goes along with wanting to check the actual error message that
is being raised, especially for user-visible stuff.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060922/a9931a85/attachment.pgp
More information about the bazaar
mailing list