/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/test_progress.py

  • Committer: Martin Pool
  • Date: 2009-01-21 06:01:17 UTC
  • mto: This revision was merged to the branch mainline in revision 3956.
  • Revision ID: mbp@sourcefrog.net-20090121060117-4c3xrje8jahq70uu
ProgressBarStack is deprecated

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009 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
27
27
        InstrumentedProgress,
28
28
        )
29
29
from bzrlib.tests import TestCase
 
30
from bzrlib.symbol_versioning import (
 
31
    deprecated_in,
 
32
    )
30
33
 
31
34
 
32
35
class FakeStack:
106
109
        self.check_stack(DummyProgress, DummyProgress)
107
110
 
108
111
    def check_stack(self, parent_class, child_class):
109
 
        stack = ProgressBarStack(klass=parent_class, to_file=StringIO())
 
112
        stack = self.applyDeprecated(
 
113
            deprecated_in((1, 12, 0)),
 
114
            ProgressBarStack,
 
115
            klass=parent_class, to_file=StringIO())
110
116
        parent = stack.get_nested()
111
117
        try:
112
118
            self.assertIs(parent.__class__, parent_class)
212
218
 
213
219
        self.addCleanup(reset)
214
220
 
215
 
        stack = ProgressBarStack(to_file=outf)
 
221
        stack = self.applyDeprecated(
 
222
            deprecated_in((1, 12, 0)),
 
223
            ProgressBarStack,
 
224
            to_file=outf)
216
225
        pb = stack.get_nested()
217
226
        pb.start_time -= 1 # Make sure it is ready to write
218
227
        pb.width = 20 # And it is of reasonable size