1
# Copyright (C) 2010 Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
"""BzrDir implementation tests for colocated branch support.
20
These tests check the conformance of the colocated branches support.
21
All bzrdir formats are tested - those that do not suppport colocated branches
22
have the test_unsupported tests run; the others have the test_supported tests
26
from bzrlib.bzrdir import BzrDirFormat
27
from bzrlib.tests import (
31
from bzrlib.tests.per_bzrdir import (
37
def load_tests(standard_tests, module, loader):
38
colo_supported_formats = []
39
colo_unsupported_formats = []
40
for format in BzrDirFormat.known_formats():
41
if format.colocated_branches:
42
colo_supported_formats.append(format)
44
colo_unsupported_formats.append(format)
45
supported_scenarios = make_scenarios(default_transport, None, None,
46
colo_supported_formats)
47
unsupported_scenarios = make_scenarios(default_transport, None, None,
48
colo_unsupported_formats)
49
result = loader.suiteClass()
50
supported_tests = loader.loadTestsFromModuleNames([
51
'bzrlib.tests.per_bzrdir_colo.test_supported'])
52
unsupported_tests = loader.loadTestsFromModuleNames([
53
'bzrlib.tests.per_bzrdir_colo.test_unsupported'])
54
multiply_tests(supported_tests, supported_scenarios, result)
55
multiply_tests(unsupported_tests, unsupported_scenarios, result)