~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branch.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from bzrlib.tests.blackbox import ExternalBase
25
25
from bzrlib.tests import HardlinkFeature
26
26
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
 
27
from bzrlib.urlutils import local_path_to_url, strip_trailing_slash
27
28
from bzrlib.workingtree import WorkingTree
28
29
 
29
30
 
97
98
        target_stat = os.stat('target/file1')
98
99
        self.assertEqual(source_stat, target_stat)
99
100
 
 
101
    def test_branch_standalone(self):
 
102
        shared_repo = self.make_repository('repo', shared=True)
 
103
        self.example_branch('source')
 
104
        self.run_bzr('branch --standalone source repo/target')
 
105
        b = branch.Branch.open('repo/target')
 
106
        expected_repo_path = os.path.abspath('repo/target/.bzr/repository')
 
107
        self.assertEqual(strip_trailing_slash(b.repository.base),
 
108
            strip_trailing_slash(local_path_to_url(expected_repo_path)))
 
109
 
100
110
 
101
111
class TestBranchStacked(ExternalBase):
102
112
    """Tests for branch --stacked"""