/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

Update test support, and remove deprecated functions pullable_revisions and get_intervening_revisions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
rather starts again from the run_bzr function.
24
24
"""
25
25
 
 
26
import sys
 
27
 
26
28
from bzrlib.tests import (
27
29
                          _load_module_by_name,
28
30
                          TestCaseWithTransport,
37
39
                     'bzrlib.tests.blackbox.test_added',
38
40
                     'bzrlib.tests.blackbox.test_aliases',
39
41
                     'bzrlib.tests.blackbox.test_ancestry',
 
42
                     'bzrlib.tests.blackbox.test_annotate',
40
43
                     'bzrlib.tests.blackbox.test_break_lock',
41
44
                     'bzrlib.tests.blackbox.test_bound_branches',
42
45
                     'bzrlib.tests.blackbox.test_cat',
91
94
            return self.run_bzr_captured(args, retcode=retcode)
92
95
 
93
96
 
94
 
class TestUIFactory(ui.UIFactory):
 
97
class TestUIFactory(ui.CLIUIFactory):
95
98
    """A UI Factory for testing - hide the progress bar but emit note()s."""
96
99
 
 
100
    def __init__(self,
 
101
                 stdout=None,
 
102
                 stderr=None):
 
103
        super(TestUIFactory, self).__init__()
 
104
        if stdout is None:
 
105
            self.stdout = sys.stdout
 
106
        else:
 
107
            self.stdout = stdout
 
108
        if stderr is None:
 
109
            self.stderr = sys.stderr
 
110
        else:
 
111
            self.stderr = stderr
 
112
 
97
113
    def clear(self):
98
114
        """See progress.ProgressBar.clear()."""
99
115
 
 
116
    def clear_term(self):
 
117
        """See progress.ProgressBar.clear_term()."""
 
118
 
100
119
    def finished(self):
101
120
        """See progress.ProgressBar.finished()."""
102
121
 
103
122
    def note(self, fmt_string, *args, **kwargs):
104
123
        """See progress.ProgressBar.note()."""
105
 
        print fmt_string % args
 
124
        self.stdout.write((fmt_string + "\n") % args)
106
125
 
107
126
    def progress_bar(self):
108
127
        return self