[patch] new merge tests suggested by Aaron
John Arbash Meinel
john at arbash-meinel.com
Wed Dec 21 15:59:55 GMT 2005
duchier at ps.uni-sb.de wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:
>
>
>>Actually, PEP8 states that single line comments are meant to have the
>>""" on the same line.
>>[...]
>>I really liked the more verbose comments, since they described what was
>>going on, and what the motivation was.
>>I just wanted the single-line summary at the top.
>>[...]
>>So if you can reformat it one more time, I'll apply it to my integration
>>branch.
>
>
> ok, here it is:
>
I think you got the diff backwards :)
I have to reverse my request. I thought they came with more description
about the operation, not just a set of shell commands.
If you are okay with it, I'll clean it up to have single-line comments
like:
def test_merge_abentley_1(self):
"""rename before create"""
Would it be okay if I just change the name of the test? So you have:
def test_rename_before_create(self):
Though I might leave a single comment line in for:
def test_create_before_rename(self):
# create before rename, target parents before children
John
=:->
>
>
> ------------------------------------------------------------------------
>
> === modified file '.bzrignore'
> --- .bzrignore
> +++ .bzrignore
> @@ -19,4 +19,3 @@
> ./ID
> ./tags
> .bzr-shelf
> -./PATCH.1
>
> === modified file 'bzrlib/tests/test_merge_core.py'
> --- bzrlib/tests/test_merge_core.py
> +++ bzrlib/tests/test_merge_core.py
> @@ -712,112 +712,3 @@
> merge(['b', -1],['b', 1],this_dir='a')
> self.assert_(os.path.exists('a/file'))
> self.assertEqual(file('a/file').read(),'THAT')
> -
> - def test_merge_abentley_1(self):
> - """rename before create
> -
> - $ touch foo
> - $ bzr add foo
> - $ bzr commit
> - $ bzr mv foo bar
> - $ touch foo
> - $ bzr add foo
> - $ bzr commit
> - """
> - os.mkdir('a')
> - a = Branch.initialize('a')
> - file('a/foo', 'wb').write('A/FOO')
> - a_wt = a.working_tree()
> - a_wt.add('foo')
> - a_wt.commit('added foo')
> - copy_branch(a, 'b')
> - b = Branch.open('b')
> - b_wt = b.working_tree()
> - b_wt.rename_one('foo', 'bar')
> - file('b/foo', 'wb').write('B/FOO')
> - b_wt.add('foo')
> - b_wt.commit('moved foo to bar, added new foo')
> - merge(['b', -1],['b', 1],this_dir='a')
> -
> - def test_merge_abentley_2(self):
> - """create before rename, target parents before children
> -
> - $ touch foo
> - $ bzr add foo
> - $ bzr commit
> - $ bzr mkdir bar
> - $ bzr add bar
> - $ bzr mv foo bar/foo
> - $ bzr commit
> - """
> - os.mkdir('a')
> - a = Branch.initialize('a')
> - file('a/foo', 'wb').write('A/FOO')
> - a_wt = a.working_tree()
> - a_wt.add('foo')
> - a_wt.commit('added foo')
> - copy_branch(a, 'b')
> - b = Branch.open('b')
> - b_wt = b.working_tree()
> - os.mkdir('b/bar')
> - b_wt.add('bar')
> - b_wt.rename_one('foo', 'bar/foo')
> - b_wt.commit('created bar dir, moved foo into bar')
> - merge(['b', -1],['b', 1],this_dir='a')
> -
> - def test_merge_abentley_3(self):
> - """rename to temp before delete, source children before parents
> -
> - $ mkdir foo
> - $ touch foo/bar
> - $ bzr add foo/bar
> - $ bzr commit
> - $ bzr mv foo/bar bar
> - $ rmdir foo
> - $ bzr commit
> - """
> - os.mkdir('a')
> - a = Branch.initialize('a')
> - os.mkdir('a/foo')
> - file('a/foo/bar', 'wb').write('A/FOO/BAR')
> - a_wt = a.working_tree()
> - a_wt.add('foo')
> - a_wt.add('foo/bar')
> - a_wt.commit('added foo/bar')
> - copy_branch(a, 'b')
> - b = Branch.open('b')
> - b_wt = b.working_tree()
> - b_wt.rename_one('foo/bar', 'bar')
> - os.rmdir('b/foo')
> - b_wt.remove('foo')
> - b_wt.commit('moved foo/bar to bar, deleted foo')
> - merge(['b', -1],['b', 1],this_dir='a')
> -
> - def test_merge_abentley_4(self):
> - """delete before rename to temp
> -
> - $ touch foo
> - $ touch bar
> - $ bzr add foo bar
> - $ bzr commit
> - $ rm foo
> - $ bzr rm foo
> - $ bzr mv bar foo
> - $ bzr commit
> - """
> - os.mkdir('a')
> - a = Branch.initialize('a')
> - file('a/foo', 'wb').write('A/FOO')
> - file('a/bar', 'wb').write('A/BAR')
> - a_wt = a.working_tree()
> - a_wt.add('foo')
> - a_wt.add('bar')
> - a_wt.commit('added foo and bar')
> - copy_branch(a, 'b')
> - b = Branch.open('b')
> - b_wt = b.working_tree()
> - os.unlink('b/foo')
> - b_wt.remove('foo')
> - b_wt.rename_one('bar', 'foo')
> - b_wt.commit('deleted foo, renamed bar to foo')
> - merge(['b', -1],['b', 1],this_dir='a')
>
>
>
> ------------------------------------------------------------------------
>
>
> --Denys
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051221/11e4488f/attachment.pgp
More information about the bazaar
mailing list