/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_sprout.py

merge bzr.dev r4164

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    revision as _mod_revision,
25
25
    tests,
26
26
    )
27
 
from bzrlib.tests import KnownFailure, SymlinkFeature, UnicodeFilenameFeature
28
27
from bzrlib.tests.branch_implementations import TestCaseWithBranch
29
28
 
30
29
 
132
131
        # Since the trigger function seems to be set_parent_trees, there exists
133
132
        # also a similar test, with name test_unicode_symlink, in class
134
133
        # TestSetParents at file workingtree_implementations/test_parents.py
135
 
        self.requireFeature(SymlinkFeature)
136
 
        self.requireFeature(UnicodeFilenameFeature)
 
134
        self.requireFeature(tests.SymlinkFeature)
 
135
        self.requireFeature(tests.UnicodeFilenameFeature)
137
136
 
138
137
        tree = self.make_branch_and_tree('tree1')
139
138
 
143
142
        os.symlink(u'\u03a9','tree1/link_name')
144
143
        tree.add(['link_name'],['link-id'])
145
144
 
146
 
        try:
147
 
            # python 2.7a0 failed on commit:
148
 
            revision = tree.commit('added a link to a Unicode target')
149
 
            # python 2.5 failed on sprout:
150
 
            tree.bzrdir.sprout('target')
151
 
        except UnicodeEncodeError, e:
152
 
            raise KnownFailure('there is no support for'
153
 
                               ' symlinks to non-ASCII targets (bug #272444)')
 
145
        revision = tree.commit('added a link to a Unicode target')
 
146
        tree.bzrdir.sprout('target')
154
147
 
155
148
    def assertBranchHookBranchIsStacked(self, pre_change_params):
156
149
        # Just calling will either succeed or fail.
172
165
                source_branch=source, stacked=True)
173
166
        except errors.UnstackableBranchFormat:
174
167
            if isinstance(self.branch_format, _mod_branch.BzrBranchFormat4):
175
 
                raise KnownFailure("Format 4 doesn't auto stack successfully.")
 
168
                raise tests.KnownFailure(
 
169
                    "Format 4 doesn't auto stack successfully.")
176
170
            else:
177
171
                raise
178
172
        result = dir.open_branch()