~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_parent.py

  • Committer: Robert Collins
  • Date: 2007-03-29 07:24:14 UTC
  • mto: (2018.18.6 hpss-faster-copy)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: robertc@robertcollins.net-20070329072414-7dh0io231c2tormb
Branch implementations test test_set_get_parent should not depend on local urls : the test can be valid for any url namespace. Change it to be valid in that manner. (Robert Collins, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import sys
21
21
 
 
22
from bzrlib import urlutils
22
23
from bzrlib.branch import Branch
23
24
import bzrlib.errors
24
25
from bzrlib.osutils import abspath, realpath, getcwd
38
39
        
39
40
    def test_set_get_parent(self):
40
41
        """Set, re-get and reset the parent"""
41
 
        b = self.make_branch('.')
 
42
        b = self.make_branch('subdir')
42
43
        url = 'http://bazaar-vcs.org/bzr/bzr.dev'
43
44
        b.set_parent(url)
44
45
        self.assertEqual(url, b.get_parent())
49
50
 
50
51
        b.set_parent('../other_branch')
51
52
 
52
 
        self.assertEqual(local_path_to_url('../other_branch'), b.get_parent())
53
 
        path = local_path_to_url('../yanb')
 
53
        expected_parent = urlutils.join(self.get_url('subdir'), '../other_branch')
 
54
        self.assertEqual(expected_parent, b.get_parent())
 
55
        path = urlutils.join(self.get_url('subdir'), '../yanb')
54
56
        b.set_parent(path)
55
57
        self.assertEqual('../yanb', b._get_parent_location())
56
58
        self.assertEqual(path, b.get_parent())