Bug triaging
Aaron Bentley
aaron.bentley at utoronto.ca
Sat Oct 29 19:27:58 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote:
> I'm trying to think about how it should work. Since in one sense the
> test should continue, even if the one section failed.
> But it really depends on how the test is written (some would expect the
> previous section to succeed in order to test the next section).
>
> I agree, it would be nice to have a new classification. Something like:
> OK, FAIL, KNOWN
>
> Of course, if you have a test which is supposed to pass, you should have
> a classification for accidental success too. :)
>
> I could also see it being done with a decorator. So you would have:
>
> @known_failure
> def test_this_fails(self):
> self.failIf(True)
A simple failure decorator could so something like this:
def expected_failure(func):
def invert_conditions(*args, **kwargs):
try:
func(*args, **kwargs)
except:
return
raise FailureError("Test passed unexpectedly")
return invert_conditions
> But I don't know how you would integrate it into the test suite.
> (Perhaps you would absorb the 'self' object, and use a wrapper).
>
> In my head, a known failure should not cause a traceback on the output,
> and should not stop "bzr selftest --one".
Actually, I was thinking about not running them at all, unless you did
"selftest --all", but I like the idea of catching unexpected success, too.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDY78u0F+nu1YWqI0RAsdTAJ9UeSBFPZ6z62jkRo7a03FrpXEf8QCfSY8+
VsOHzwEEn4Ue6oULaYsxXfQ=
=p5ki
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list