[MERGE] remerge doesn't clobber unrelated conflicts
Martin Pool
mbp at canonical.com
Mon Jul 3 06:26:48 BST 2006
On 2 Jul 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> John Arbash Meinel wrote:
> > I won't block on the assertEqual stuff, but I think we are trying to do
> > 'expected, actual'. Otherwise +1.
>
> My recollection is that our discussions have been inconclusive. We have
> a pretty even mix of 'expected, actual' and 'actual, expected'. If you
> look at the asymmetric methods we've added to TestCase:
>
> assertStartsWith: actual, expected
> assertEndsWith: actual, expected
> assertContainsRe: actual, expected
> assertNotContainstRe: actual, expected
> assertSubset: depends on usage
> assertTransportMode: actual, expected
> assertIsInstance: actual, expected
> assertFileEqual: expected, actual
>
> I find 'expected, actual' formulations are unituitive and produce
> unintuitive diagnostics. They strike me as brain damage from C-like
> languages, where "5 == x" is a safer to write than "x == 5".
Robert has said that (expected, actual) is the recommended practice for
pyunit, or perhaps for all unittest-related frameworks. I tend to agree
that (actual, expected) feels more natural somehow but I do think we
should be consistent.
--
Martin
More information about the bazaar
mailing list