[MERGE] New option --author for commit

Lukáš Lalinský lalinsky at gmail.com
Wed Aug 8 06:56:41 BST 2007


On Ut, 2007-08-07 at 17:07 -0400, Aaron Bentley wrote:
> > +    def test_commit_author_conflict(self):
> > +        """Passing both author kwarg and 'author' key in revprops should
> > +        raise AssertionError.
> > +        """
> > +        tree = self.make_branch_and_tree('foo')
> > +        self.assertRaises(AssertionError, tree.commit, 'commit 1',
> > +                          author='John Doe <jdoe at example.com>',
> > +                          revprops={'author': ''})
> 
> We want our test suite to pass when run with python -O.  This is why we
> use assertTrue, assertEqual etc., instead of 'assert x == y'.
> 
> This test case will fail when run with python -O, because it will skip
> the assert.  Because it's a programming error, you don't have to test
> this case, but if you want to, then MutableTree.commit must not use
> 'assert'.

Right, I forgot that the assert won't raise AssertionError in optimized
mode. I've removed the test.

Thanks again for the review.

Lukas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-commit-author.diff
Type: text/x-patch
Size: 21334 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070808/bc295b56/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070808/bc295b56/attachment-0001.pgp 


More information about the bazaar mailing list