1
# Copyright (C) 2005, 2006 by Canonical Ltd
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
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
44
48
'bzrlib.tests.blackbox.test_annotate',
45
49
'bzrlib.tests.blackbox.test_branch',
46
50
'bzrlib.tests.blackbox.test_break_lock',
51
'bzrlib.tests.blackbox.test_breakin',
47
52
'bzrlib.tests.blackbox.test_bound_branches',
48
53
'bzrlib.tests.blackbox.test_bundle',
49
54
'bzrlib.tests.blackbox.test_cat',
55
'bzrlib.tests.blackbox.test_cat_revision',
50
56
'bzrlib.tests.blackbox.test_checkout',
51
57
'bzrlib.tests.blackbox.test_command_encoding',
52
58
'bzrlib.tests.blackbox.test_commit',
53
59
'bzrlib.tests.blackbox.test_conflicts',
60
'bzrlib.tests.blackbox.test_debug',
54
61
'bzrlib.tests.blackbox.test_diff',
55
62
'bzrlib.tests.blackbox.test_exceptions',
56
63
'bzrlib.tests.blackbox.test_export',
61
68
'bzrlib.tests.blackbox.test_info',
62
69
'bzrlib.tests.blackbox.test_init',
63
70
'bzrlib.tests.blackbox.test_inventory',
71
'bzrlib.tests.blackbox.test_join',
64
72
'bzrlib.tests.blackbox.test_locale',
65
73
'bzrlib.tests.blackbox.test_log',
66
74
'bzrlib.tests.blackbox.test_logformats',
67
75
'bzrlib.tests.blackbox.test_ls',
76
'bzrlib.tests.blackbox.test_lsprof',
68
77
'bzrlib.tests.blackbox.test_merge',
78
'bzrlib.tests.blackbox.test_merge_directive',
69
79
'bzrlib.tests.blackbox.test_missing',
70
80
'bzrlib.tests.blackbox.test_mv',
81
'bzrlib.tests.blackbox.test_nick',
71
82
'bzrlib.tests.blackbox.test_outside_wt',
72
83
'bzrlib.tests.blackbox.test_pull',
73
84
'bzrlib.tests.blackbox.test_push',
75
86
'bzrlib.tests.blackbox.test_remerge',
76
87
'bzrlib.tests.blackbox.test_remove',
77
88
'bzrlib.tests.blackbox.test_re_sign',
89
'bzrlib.tests.blackbox.test_remove_tree',
78
90
'bzrlib.tests.blackbox.test_revert',
79
91
'bzrlib.tests.blackbox.test_revno',
80
92
'bzrlib.tests.blackbox.test_revision_history',
83
95
'bzrlib.tests.blackbox.test_serve',
84
96
'bzrlib.tests.blackbox.test_shared_repository',
85
97
'bzrlib.tests.blackbox.test_sign_my_commits',
98
'bzrlib.tests.blackbox.test_split',
86
99
'bzrlib.tests.blackbox.test_status',
100
'bzrlib.tests.blackbox.test_tags',
87
101
'bzrlib.tests.blackbox.test_testament',
88
102
'bzrlib.tests.blackbox.test_too_much',
89
103
'bzrlib.tests.blackbox.test_uncommit',
90
104
'bzrlib.tests.blackbox.test_update',
91
105
'bzrlib.tests.blackbox.test_upgrade',
106
'bzrlib.tests.blackbox.test_version',
92
107
'bzrlib.tests.blackbox.test_version_info',
93
108
'bzrlib.tests.blackbox.test_versioning',
94
109
'bzrlib.tests.blackbox.test_whoami',
109
124
class ExternalBase(TestCaseWithTransport):
111
def runbzr(self, args, retcode=0, backtick=False):
126
@deprecated_method(zero_eighteen)
127
def runbzr(self, args, retcode=0):
112
128
if isinstance(args, basestring):
113
129
args = args.split()
115
return self.run_bzr_captured(args, retcode=retcode)[0]
117
return self.run_bzr_captured(args, retcode=retcode)
120
class TestUIFactory(ui.CLIUIFactory):
121
"""A UI Factory for testing - hide the progress bar but emit note()s."""
126
super(TestUIFactory, self).__init__()
128
self.stdout = sys.stdout
132
self.stderr = sys.stderr
137
"""See progress.ProgressBar.clear()."""
139
def clear_term(self):
140
"""See progress.ProgressBar.clear_term()."""
142
def clear_term(self):
143
"""See progress.ProgressBar.clear_term()."""
146
"""See progress.ProgressBar.finished()."""
148
def note(self, fmt_string, *args, **kwargs):
149
"""See progress.ProgressBar.note()."""
150
self.stdout.write((fmt_string + "\n") % args)
152
def progress_bar(self):
155
def nested_progress_bar(self):
158
def update(self, message, count=None, total=None):
159
"""See progress.ProgressBar.update()."""
130
return self.run_bzr(args, retcode=retcode)
132
def check_output(self, output, *args):
133
"""Verify that the expected output matches what bzr says.
135
The output is supplied first, so that you can supply a variable
136
number of arguments to bzr.
138
self.assertEquals(self.run_bzr(*args)[0], output)