~toddy/bzr/bzr.i18n

« back to all changes in this revision

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

  • Committer: Tobias Toedter
  • Date: 2008-02-10 08:01:48 UTC
  • mfrom: (2438.1.783 +trunk)
  • Revision ID: t.toedter@gmx.net-20080210080148-bg5rh61oq2zk2xw3
Merge trunk

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