~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

[patch] use unicode literals for all hardcoded paths (Alexander Belchenko)

> When you use flat string on Windows for base part of file names then all
> derived file names is always representing as flat string. On Linux/Cygwin as
> I can see in situations when path cannot be represented as flat string (or in
> ascii encoding?) it silently converted to unicode. As result we have
> different behaviour with non-ascii (non-english) file names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
class TestMerge(TestCaseInTempDir):
13
13
    """Test appending more than one revision"""
14
14
    def test_pending(self):
15
 
        br = Branch.initialize(".")
 
15
        br = Branch.initialize(u".")
16
16
        commit(br, "lala!")
17
17
        self.assertEquals(len(br.working_tree().pending_merges()), 0)
18
 
        merge(['.', -1], [None, None])
 
18
        merge([u'.', -1], [None, None])
19
19
        self.assertEquals(len(br.working_tree().pending_merges()), 0)
20
20
 
21
21
    def test_nocommits(self):
36
36
    def test_pending_with_null(self):
37
37
        """When base is forced to revno 0, pending_merges is set"""
38
38
        br2 = self.test_unrelated()
39
 
        br1 = Branch.open('.')
 
39
        br1 = Branch.open(u'.')
40
40
        fetch(from_branch=br2, to_branch=br1)
41
41
        # merge all of branch 2 into branch 1 even though they 
42
42
        # are not related.
55
55
 
56
56
    def test_create_rename(self):
57
57
        """Rename an inventory entry while creating the file"""
58
 
        b = Branch.initialize('.')
 
58
        b = Branch.initialize(u'.')
59
59
        file('name1', 'wb').write('Hello')
60
60
        tree = b.working_tree()
61
61
        tree.add('name1')
66
66
 
67
67
    def test_layered_rename(self):
68
68
        """Rename both child and parent at same time"""
69
 
        b = Branch.initialize('.')
 
69
        b = Branch.initialize(u'.')
70
70
        tree = b.working_tree()
71
71
        os.mkdir('dirname1')
72
72
        tree.add('dirname1')