[MERGE] bzr missing: show last saved location unescaped

Martin Pool mbp at canonical.com
Wed Jan 24 11:35:34 GMT 2007


On 24 Jan 2007, Alexander Belchenko <bialix at ukr.net> wrote:

> Usually I use some old test to write new one.
> I'm poorly orientate in overall bzrlib API.
> It's too huge for me.

Really I think copying from existing similar tests is pretty reasonable
and understandable, as long as it's not making things worse.  The api is
not too bad, but there are some aspects that are unclear as they're used
in tests: what format and transports are used, etc.  On the other hand I
understand John not wanting to repeat bad code...

> Test that I'm wrote is designed based on
> the test already present in blackbox/test_missing.py.
> 
> Can you point me to another good test that use mentioned API
> for reference? I'm afraid without any reference I'm unable to write
> what you want.

I think a good example is for example in test_status:


    def test_pending(self):
        """Pending merges display works, including Unicode"""
        mkdir("./branch")
        wt = self.make_branch_and_tree('branch')
        b = wt.branch
        wt.commit("Empty commit 1")
        b_2_dir = b.bzrdir.sprout('./copy')
        b_2 = b_2_dir.open_branch()
        wt2 = b_2_dir.open_workingtree()
        wt.commit(u"\N{TIBETAN DIGIT TWO} Empty commit 2")
        merge(["./branch", -1], [None, None], this_dir = './copy')
        message = self.status_string(wt2)
        self.assert_(message.startswith("pending merges:\n"))
        self.assert_(message.endswith("Empty commit 2\n")) 

-- 
Martin



More information about the bazaar mailing list