~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tests/test_bashcomp.py

Allow different formats for tag completion.                                          
                                                                                     
The tests now use the dirstate-tags format, as does the
bzrlib.tests.test_tag module.  As "bzr tags" will print a warning about a
deprecated format for this, we should discard its error output.

That seems a good idea for production environments as well, as outdated
formats might be quite frequent, and having completion print error messages
for all of these is certainly bad style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
        return s.replace("$(bzr ", "$('%s' " % self.get_bzr_path())
188
188
 
189
189
    def test_revspec_tag_all(self):
190
 
        wt = self.make_branch_and_tree('.', format='2a')
 
190
        wt = self.make_branch_and_tree('.', format='dirstate-tags')
191
191
        wt.branch.tags.set_tag('tag1', 'null:')
192
192
        wt.branch.tags.set_tag('tag2', 'null:')
193
193
        wt.branch.tags.set_tag('3tag', 'null:')
195
195
                      expect=['tag1', 'tag2', '3tag'])
196
196
 
197
197
    def test_revspec_tag_prefix(self):
198
 
        wt = self.make_branch_and_tree('.', format='2a')
 
198
        wt = self.make_branch_and_tree('.', format='dirstate-tags')
199
199
        wt.branch.tags.set_tag('tag1', 'null:')
200
200
        wt.branch.tags.set_tag('tag2', 'null:')
201
201
        wt.branch.tags.set_tag('3tag', 'null:')