[BUG] python -O bzr selftest fails

Martin Pool martinpool at gmail.com
Mon Oct 31 21:02:04 GMT 2005


On 29/10/05, John A Meinel <john at arbash-meinel.com> 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.
>
> All lines with side-effects should use self.assert_ or self.failUnless.
> I would recommend all lines should use these anyway, since it is a test
> suite, where you want assertions to be checked.

I think you're right; we should remove assert statements from the tests.

I do run bzr with -O and I think it should be supported.  I think it's
much more rare for people to use -OO.  If you accept that using
docstrings for content is OK, then -OO is just going to break that.  I
suppose it would be OK for -OO to give you a bzr without any help
strings.

--
Martin




More information about the bazaar mailing list