/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
5273.1.8 by Vincent Ladeuil
Merge bzr.dev into cleanup
1
# Copyright (C) 2005-2010 Canonical Ltd
1831.1.1 by Martin Pool
[merge] remove default ignore list & update
2
#
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
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.
1831.1.1 by Martin Pool
[merge] remove default ignore list & update
7
#
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
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.
1831.1.1 by Martin Pool
[merge] remove default ignore list & update
12
#
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
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
4183.7.1 by Sabin Iacob
update FSF mailing address
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
16
17
18
"""Black-box tests for bzr.
19
20
These check that it behaves properly when it's invoked through the regular
3943.8.1 by Marius Kruger
remove all trailing whitespace from bzr source
21
command-line interface. This doesn't actually run a new interpreter but
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
22
rather starts again from the run_bzr function.
23
"""
24
1692.3.3 by Robert Collins
Get run_bzr in tests to always assign a new, clean ui factory.
25
5283.4.1 by Martin Pool
Deprecate ExternalBase.check_output and update some callers to use scripts
26
from bzrlib.symbol_versioning import (
27
    deprecated_in,
28
    deprecated_method,
29
    )
5184.1.1 by Vincent Ladeuil
Random cleanups to catch up with copyright updates in trunk.
30
from bzrlib import tests
1570.1.2 by Robert Collins
Import bzrtools' 'fix' command as 'bzr reconcile.'
31
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
32
3302.9.6 by Vincent Ladeuil
bzrlib.tests.blackbox switched from test_suite() to load_tests().
33
def load_tests(basic_tests, module, loader):
34
    suite = loader.suiteClass()
35
    # add the tests for this module
36
    suite.addTests(basic_tests)
37
5455.1.1 by Vincent Ladeuil
Add a new hidden ``test-script`` command.
38
    prefix = 'bzrlib.tests.blackbox.'
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
39
    testmod_names = [
5455.1.1 by Vincent Ladeuil
Add a new hidden ``test-script`` command.
40
                     'test_add',
41
                     'test_added',
42
                     'test_alias',
43
                     'test_aliases',
44
                     'test_ancestry',
45
                     'test_annotate',
46
                     'test_branch',
47
                     'test_break_lock',
48
                     'test_breakin',
49
                     'test_bound_branches',
50
                     'test_bundle_info',
51
                     'test_cat',
52
                     'test_cat_revision',
53
                     'test_check',
54
                     'test_checkout',
55
                     'test_clean_tree',
56
                     'test_command_encoding',
57
                     'test_commit',
5455.1.6 by Vincent Ladeuil
Merge bzr.dev
58
                     'test_config',
5455.1.1 by Vincent Ladeuil
Add a new hidden ``test-script`` command.
59
                     'test_conflicts',
60
                     'test_debug',
61
                     'test_deleted',
62
                     'test_diff',
63
                     'test_dump_btree',
64
                     'test_dpush',
65
                     'test_exceptions',
66
                     'test_export',
67
                     'test_filesystem_cicp',
68
                     'test_filtered_view_ops',
69
                     'test_find_merge_base',
70
                     'test_help',
71
                     'test_hooks',
72
                     'test_ignore',
73
                     'test_ignored',
74
                     'test_info',
75
                     'test_init',
76
                     'test_inventory',
77
                     'test_join',
78
                     'test_locale',
79
                     'test_log',
80
                     'test_logformats',
81
                     'test_lookup_revision',
82
                     'test_ls',
83
                     'test_lsprof',
84
                     'test_merge',
85
                     'test_merge_directive',
86
                     'test_missing',
87
                     'test_modified',
88
                     'test_mv',
89
                     'test_nick',
90
                     'test_non_ascii',
91
                     'test_outside_wt',
92
                     'test_pack',
93
                     'test_pull',
94
                     'test_push',
95
                     'test_reconcile',
96
                     'test_reconfigure',
97
                     'test_reference',
98
                     'test_remerge',
99
                     'test_remove',
100
                     'test_re_sign',
101
                     'test_remove_tree',
4597.9.19 by Vincent Ladeuil
resolve now reports conflicts resolved/remaining.
102
                     'test_resolve',
5455.1.1 by Vincent Ladeuil
Add a new hidden ``test-script`` command.
103
                     'test_revert',
104
                     'test_revno',
105
                     'test_revision_history',
106
                     'test_revision_info',
107
                     'test_rmbranch',
108
                     'test_script',
109
                     'test_selftest',
110
                     'test_send',
111
                     'test_serve',
112
                     'test_shared_repository',
113
                     'test_shelve',
114
                     'test_sign_my_commits',
115
                     'test_split',
116
                     'test_status',
117
                     'test_switch',
118
                     'test_tags',
119
                     'test_testament',
120
                     'test_too_much',
121
                     'test_uncommit',
122
                     'test_unknowns',
123
                     'test_update',
124
                     'test_upgrade',
125
                     'test_version',
126
                     'test_version_info',
127
                     'test_versioning',
128
                     'test_view',
129
                     'test_whoami',
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
130
                     ]
3302.9.27 by Vincent Ladeuil
Fixed as per Ian's review.
131
    # add the tests for the sub modules
5455.1.1 by Vincent Ladeuil
Add a new hidden ``test-script`` command.
132
    suite.addTests(loader.loadTestsFromModuleNames(
133
            [prefix + module_name for module_name in testmod_names]))
1185.85.24 by John Arbash Meinel
Moved run_bzr_decode into TestCase
134
    return suite
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
135
136
5184.1.1 by Vincent Ladeuil
Random cleanups to catch up with copyright updates in trunk.
137
class ExternalBase(tests.TestCaseWithTransport):
5283.4.5 by Martin Pool
Update remaining subclasses of ExternalBase
138
    """Don't use this class anymore, use TestCaseWithTransport or similar"""
1513 by Robert Collins
Blackbox tests are maintained within the bzrlib.tests.blackbox directory.
139
5283.4.1 by Martin Pool
Deprecate ExternalBase.check_output and update some callers to use scripts
140
    @deprecated_method(deprecated_in((2, 2, 0)))
1551.13.17 by Aaron Bentley
Move cat-revision tests out of test_revision_info
141
    def check_output(self, output, *args):
142
        """Verify that the expected output matches what bzr says.
143
144
        The output is supplied first, so that you can supply a variable
145
        number of arguments to bzr.
146
        """
2530.3.4 by Martin Pool
Deprecate run_bzr_captured in favour of just run_bzr
147
        self.assertEquals(self.run_bzr(*args)[0], output)