/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2008-02-13 03:30:01 UTC
  • mfrom: (3221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3224.
  • Revision ID: robertc@robertcollins.net-20080213033001-rw70ul0zb02ph856
Merge to fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import bzrlib.errors
21
21
from bzrlib.osutils import getcwd
22
 
from bzrlib.tests import TestCaseWithTransport
 
22
from bzrlib.tests import (
 
23
    TestCaseWithTransport,
 
24
    TestNotApplicable,
 
25
    TestSkipped,
 
26
    )
23
27
from bzrlib import urlutils
24
28
 
25
29
 
84
88
        # With an invalid branch parent, just return None
85
89
        self.assertRaises(bzrlib.errors.InaccessibleParent, b.get_parent)
86
90
 
 
91
    def test_win32_set_parent_on_another_drive(self):
 
92
        if sys.platform != 'win32':
 
93
            raise TestSkipped('windows-specific test')
 
94
        b = self.make_branch('.')
 
95
        base_url = b.abspath('.')
 
96
        if not base_url.startswith('file:///'):
 
97
            raise TestNotApplicable('this test should be run with local base')
 
98
        base = urlutils.local_path_from_url(base_url)
 
99
        other = 'file:///B:/path'
 
100
        if base[0] != 'C':
 
101
            other = 'file:///C:/path'
 
102
        b.set_parent(other)
 
103
        self.assertEquals(other, b._get_parent_location())