[BUG] python -O bzr selftest fails

Robert Collins robertc at robertcollins.net
Sat Oct 29 22:49:33 BST 2005


On Sat, 2005-10-29 at 15:26 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> John A Meinel wrote:
> > https://launchpad.net/products/bzr/+bug/3685
> > 
> > In summary, because python -O turns off assert statements, not all
> > commands are run in the test suite. There are several lines with "assert
> > <something>" where <something> has a side effect.
> 
> This feels like one of those "Doctor, it hurts when I do this" "So stop
> doing that" situations.  Yes, we can turn assert into something else,
> but -O -O will still kill us hard, because we require docstrings to
> exist (e.g. in BzrNewError).

https://wiki.launchpad.canonical.com/AssertionsInLaunchpad

You may find that interesting. I think its important to note (its not on
that page yet) that asserts are for pre and post condition testing -
something that runtime disabling should have -no- impact on program
correctness. That is, it should be impossible for a user, or external
data, to trigger an assertion, under any circumstances. When they do,
its a bug.

Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051029/19505320/attachment.pgp 


More information about the bazaar mailing list