~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/__init__.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) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-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
23
23
"""
24
24
 
25
25
from bzrlib import (
26
 
    errors,
 
26
    branchbuilder,
27
27
    tests,
28
28
    workingtree,
29
29
    )
58
58
        made_control.create_branch()
59
59
        return self.workingtree_format.initialize(made_control)
60
60
 
61
 
 
62
 
def workingtree_formats():
63
 
    """The known working tree formats."""
64
 
    return (workingtree.WorkingTreeFormat._formats.values() +
65
 
        workingtree._legacy_formats)
 
61
    def make_branch_builder(self, relpath, format=None):
 
62
        if format is None:
 
63
            format = self.bzrdir_format
 
64
        builder = branchbuilder.BranchBuilder(self.get_transport(relpath),
 
65
                                              format=format)
 
66
        return builder
66
67
 
67
68
 
68
69
def load_tests(standard_tests, module, loader):
75
76
        'break_lock',
76
77
        'changes_from',
77
78
        'check',
 
79
        'check_state',
78
80
        'content_filters',
79
81
        'commit',
80
82
        'eol_conversion',
117
119
        # None here will cause a readonly decorator to be created
118
120
        # by the TestCaseWithTransport.get_readonly_transport method.
119
121
        None,
120
 
        workingtree_formats()
 
122
        workingtree.format_registry._get_all()
121
123
        )
122
124
 
123
125
    # add the tests for the sub modules