~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-02 19:52:23 UTC
  • mfrom: (3139.2.2 fix.90847)
  • Revision ID: pqm@pqm.ubuntu.com-20080102195223-2kpjtcoeqvvcrcki
(bialix) fix #90847: fix problem with parent location on another
 logical drive

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())