~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-11-08 19:09:55 UTC
  • mfrom: (6248 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6249.
  • Revision ID: jelmer@samba.org-20111108190955-xspn5rb9kpgw78oy
mergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from bzrlib.revision import NULL_REVISION
22
22
from bzrlib.tests import TestCaseWithTransport
23
 
 
 
23
from bzrlib.version_info_formats import VersionInfoBuilder
24
24
 
25
25
class TestVersionInfo(TestCaseWithTransport):
26
26
 
150
150
            '"{revno} {branch_nick} {clean}\n" branch')
151
151
        self.assertEqual("2 branch 0\n", out)
152
152
        self.assertEqual("", err)
153
 
    
 
153
 
 
154
    def test_custom_no_clean_in_template(self):
 
155
        def should_not_be_called(self):
 
156
            raise AssertionError("Method on %r should not have been used" % (self,))
 
157
        self.overrideAttr(VersionInfoBuilder, "_extract_file_revisions",
 
158
                          should_not_be_called)
 
159
        self.create_tree()
 
160
        out, err = self.run_bzr('version-info --custom --template=r{revno} branch')
 
161
        self.assertEqual("r2", out)
 
162
        self.assertEqual("", err)
 
163
 
154
164
    def test_non_ascii(self):
155
165
        """Test that we can output non-ascii data"""
156
166