~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-11 02:48:31 UTC
  • mfrom: (5847.1.6 2.4-uncommit-faster)
  • Revision ID: pqm@pqm.ubuntu.com-20110511024831-tm38ubce8znnq351
(jameinel) Make set_parent_trees() ~5% faster by improving the sort key
 function. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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,
28
27
    tests,
29
28
    version_info_formats,
30
29
    )
137
136
            return new_stanzas[0]
138
137
 
139
138
        stanza = regen()
140
 
        self.failUnless('date' in stanza)
141
 
        self.failUnless('build-date' in stanza)
 
139
        self.assertTrue('date' in stanza)
 
140
        self.assertTrue('build-date' in stanza)
142
141
        self.assertEqual(['3'], stanza.get_all('revno'))
143
142
        self.assertEqual(['r3'], stanza.get_all('revision-id'))
144
143
 
193
192
        val = sio.getvalue()
194
193
        self.assertContainsRe(val, "'revision_id': None")
195
194
        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.failUnless(tvi.version_info.has_key('date'))
 
228
        self.assertTrue(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)