Expected failure not failing when assertion succeeds

Martin Pool mbp at canonical.com
Wed Feb 17 00:04:59 GMT 2010


On 17 February 2010 08:07, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Which seems to try to call 'addUnexpectedSuccess' to its child, and if
> it doesn't have it, then it just calls 'addSuccess'. So it is possible
> that we just need to implement 'addUnexpectedSuccess'.
>
> On the other hand, shouldn't an unexpected success default to being
> treated as a failure (addFailure() rather than addSuccess)?

Yes, it should.  If you treat it as "don't care" there is no point
having the test, as you won't remember to update it when you do fix
the thing.

I'm glad the test infrastructure can be in testtools and not done
locked in to bzrlib, but I have an unworthy "told you so" feeling
about the fallout, and specifically about fallout that means tests are
neutered.  I guess it can all be fixed, and to be fair Robert did
acknowledge there would be accidental changes.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list