/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/__init__.py

Merge from bzr.dev, resolving the worst of the semantic conflicts, but there's
still a little bit of breakage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 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
62
62
                     'bzrlib.tests.blackbox.test_info',
63
63
                     'bzrlib.tests.blackbox.test_init',
64
64
                     'bzrlib.tests.blackbox.test_inventory',
 
65
                     'bzrlib.tests.blackbox.test_join',
65
66
                     'bzrlib.tests.blackbox.test_locale',
66
67
                     'bzrlib.tests.blackbox.test_log',
67
68
                     'bzrlib.tests.blackbox.test_logformats',
68
69
                     'bzrlib.tests.blackbox.test_ls',
69
70
                     'bzrlib.tests.blackbox.test_merge',
 
71
                     'bzrlib.tests.blackbox.test_merge_directive',
70
72
                     'bzrlib.tests.blackbox.test_missing',
71
73
                     'bzrlib.tests.blackbox.test_mv',
72
74
                     'bzrlib.tests.blackbox.test_nick',
86
88
                     'bzrlib.tests.blackbox.test_serve',
87
89
                     'bzrlib.tests.blackbox.test_shared_repository',
88
90
                     'bzrlib.tests.blackbox.test_sign_my_commits',
 
91
                     'bzrlib.tests.blackbox.test_split',
89
92
                     'bzrlib.tests.blackbox.test_status',
 
93
                     'bzrlib.tests.blackbox.test_tags',
90
94
                     'bzrlib.tests.blackbox.test_testament',
91
95
                     'bzrlib.tests.blackbox.test_too_much',
92
96
                     'bzrlib.tests.blackbox.test_uncommit',
118
122
            return self.run_bzr_captured(args, retcode=retcode)[0]
119
123
        else:
120
124
            return self.run_bzr_captured(args, retcode=retcode)
121
 
 
122
 
 
123
 
class TestUIFactory(ui.CLIUIFactory):
124
 
    """A UI Factory for testing - hide the progress bar but emit note()s."""
125
 
 
126
 
    def __init__(self,
127
 
                 stdout=None,
128
 
                 stderr=None):
129
 
        super(TestUIFactory, self).__init__()
130
 
        if stdout is None:
131
 
            self.stdout = sys.stdout
132
 
        else:
133
 
            self.stdout = stdout
134
 
        if stderr is None:
135
 
            self.stderr = sys.stderr
136
 
        else:
137
 
            self.stderr = stderr
138
 
 
139
 
    def clear(self):
140
 
        """See progress.ProgressBar.clear()."""
141
 
 
142
 
    def clear_term(self):
143
 
        """See progress.ProgressBar.clear_term()."""
144
 
 
145
 
    def clear_term(self):
146
 
        """See progress.ProgressBar.clear_term()."""
147
 
 
148
 
    def finished(self):
149
 
        """See progress.ProgressBar.finished()."""
150
 
 
151
 
    def note(self, fmt_string, *args, **kwargs):
152
 
        """See progress.ProgressBar.note()."""
153
 
        self.stdout.write((fmt_string + "\n") % args)
154
 
 
155
 
    def progress_bar(self):
156
 
        return self
157
 
    
158
 
    def nested_progress_bar(self):
159
 
        return self
160
 
 
161
 
    def update(self, message, count=None, total=None):
162
 
        """See progress.ProgressBar.update()."""