~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-11-16 06:06:11 UTC
  • mto: This revision was merged to the branch mainline in revision 5540.
  • Revision ID: andrew.bennetts@canonical.com-20101116060611-yar5447lk6os78u3
Remove broken, unused elif branch, and remove some unused imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
140
140
        out, err = self.run_bzr('annotate hello.txt -r 10',
141
141
                                retcode=3)
142
142
        self.assertEqual('', out)
143
 
        self.assertContainsRe(err, 'Requested revision: \'10\' does not exist')
 
143
        self.assertContainsRe(err, "Requested revision: '10' does not exist")
144
144
 
145
145
    def test_annotate_cmd_two_revisions(self):
146
146
        out, err = self.run_bzr('annotate hello.txt -r1..2',
278
278
        os.chdir('branch')
279
279
        out, err = self.run_bzr('annotate empty')
280
280
        self.assertEqual('', out)
 
281
 
 
282
    def test_annotate_directory(self):
 
283
        """Test --directory option"""
 
284
        wt = self.make_branch_and_tree('a')
 
285
        self.build_tree_contents([('a/hello.txt', 'my helicopter\n')])
 
286
        wt.add(['hello.txt'])
 
287
        wt.commit('commit', committer='test@user')
 
288
        out, err = self.run_bzr('annotate -d a hello.txt')
 
289
        self.assertEqualDiff('1   test@us | my helicopter\n', out)