Test clarification

John A Meinel john at arbash-meinel.com
Thu Dec 1 14:10:01 GMT 2005


I just wanted to try and get a consistent use of:

self.assertEquals(a, b)

Should a or b be the "expected" value.

For example, should the test be written:

a = somecommand()
self.assertEquals(a, 'this text')

or

a = somecommand()
self.assertEquals('this text', a)


The former makes a little bit more sense in a "assert a equals b". Which
has the feeling that a should be the one doing the equaling.

It would be nice if tests were consistent about it, though. So when you
look at the errors, you know which one is incorrect.

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/20051201/227a77c5/attachment.pgp 


More information about the bazaar mailing list