~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
24
24
from bzrlib import (
25
25
    errors,
26
26
    registry,
 
27
    symbol_versioning,
27
28
    tests,
28
29
    version_info_formats,
29
30
    )
136
137
            return new_stanzas[0]
137
138
 
138
139
        stanza = regen()
139
 
        self.assertTrue('date' in stanza)
140
 
        self.assertTrue('build-date' in stanza)
 
140
        self.failUnless('date' in stanza)
 
141
        self.failUnless('build-date' in stanza)
141
142
        self.assertEqual(['3'], stanza.get_all('revno'))
142
143
        self.assertEqual(['r3'], stanza.get_all('revision-id'))
143
144
 
192
193
        val = sio.getvalue()
193
194
        self.assertContainsRe(val, "'revision_id': None")
194
195
        self.assertContainsRe(val, "'revno': 0")
195
 
        self.assertNotContainsString(val, '\n\n\n\n')
196
196
 
197
197
    def test_python_version(self):
198
198
        wt = self.create_branch()
225
225
        tvi = regen()
226
226
        self.assertEqual(3, tvi.version_info['revno'])
227
227
        self.assertEqual('r3', tvi.version_info['revision_id'])
228
 
        self.assertTrue(tvi.version_info.has_key('date'))
 
228
        self.failUnless(tvi.version_info.has_key('date'))
229
229
        self.assertEqual(None, tvi.version_info['clean'])
230
230
 
231
231
        tvi = regen(check_for_clean=True)