/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

  • Committer: Martin
  • Date: 2011-05-21 16:43:19 UTC
  • mto: This revision was merged to the branch mainline in revision 5907.
  • Revision ID: gzlist@googlemail.com-20110521164319-5ua6aoazejsvef0w
Avoid implicit str casting in trace methods by calling unicode() on conflict objects first

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)