~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_parent.py

Nathaniel McCallums patch for urandom friendliness on aix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
class TestParent(TestCaseInTempDir):
25
25
    def test_no_default_parent(self):
26
26
        """Branches should have no parent by default"""
27
 
        b = Branch.initialize('.')
 
27
        b = Branch('.', init=True)
28
28
        self.assertEquals(b.get_parent(), None)
29
29
        
30
30
    
31
31
    def test_set_get_parent(self):
32
32
        """Set and then re-get the parent"""
33
 
        b = Branch.initialize('.')
 
33
        b = Branch('.', init=True)
34
34
        url = 'http://bazaar-ng.org/bzr/bzr.dev'
35
35
        b.set_parent(url)
36
36
        self.assertEquals(b.get_parent(), url)
40
40
        from bzrlib.commands import run_bzr
41
41
 
42
42
        os.mkdir('from')
43
 
        branch_from = Branch.initialize('from')
 
43
        branch_from = Branch('from', init=True)
44
44
        file('from/foo', 'wt').write('contents of foo')
45
45
        branch_from.add('foo')
46
46
        branch_from.commit('initial commit')
48
48
        os.mkdir('to')
49
49
        copy_branch(branch_from, 'to', None)
50
50
 
51
 
        branch_to = Branch.open('to')
 
51
        branch_to = Branch('to')
52
52
        abspath = os.path.abspath('from')
53
53
        self.assertEquals(branch_to.get_parent(), abspath)
54
54