~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_info.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2010 Canonical Ltd
 
1
# Copyright (C) 2007-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
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import sys
18
 
from urllib import quote
19
18
 
20
19
from bzrlib import (
21
20
    branch as _mod_branch,
149
148
            if key in ('pack-0.92',):
150
149
                expected = 'pack-0.92'
151
150
            elif key in ('knit', 'metaweave'):
152
 
                expected = 'knit or metaweave'
 
151
                if 'metaweave' in bzrdir.format_registry:
 
152
                    expected = 'knit or metaweave'
 
153
                else:
 
154
                    expected = 'knit'
153
155
            elif key in ('1.14', '1.14-rich-root'):
154
156
                expected = '1.14 or 1.14-rich-root'
155
157
            self.assertCheckoutDescription(key, expected)
184
186
                expected = '1.14-rich-root'
185
187
            self.assertRepoDescription(key, expected)
186
188
 
187
 
        format = bzrdir.format_registry.make_bzrdir('metaweave')
 
189
        format = bzrdir.format_registry.make_bzrdir('knit')
188
190
        format.set_branch_format(_mod_branch.BzrBranchFormat6())
189
191
        tree = self.make_branch_and_tree('unknown', format=format)
190
192
        self.assertEqual('unnamed', info.describe_format(tree.bzrdir,