/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: Robert Collins
  • Date: 2008-02-13 03:30:01 UTC
  • mfrom: (3221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3224.
  • Revision ID: robertc@robertcollins.net-20080213033001-rw70ul0zb02ph856
Merge to fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
        TTYProgressBar,
25
25
        DotsProgressBar,
26
26
        ProgressBarStack,
 
27
        InstrumentedProgress,
27
28
        )
28
29
from bzrlib.tests import TestCase
29
30
 
37
38
        return self.__top
38
39
 
39
40
 
40
 
class InstrumentedProgress(TTYProgressBar):
41
 
    """TTYProgress variant that tracks outcomes"""
42
 
 
43
 
    def __init__(self, *args, **kwargs):
44
 
        self.always_throttled = True
45
 
        TTYProgressBar.__init__(self, *args, **kwargs)
46
 
 
47
 
    def throttle(self, old_message):
48
 
        result = TTYProgressBar.throttle(self, old_message)
49
 
        if result is False:
50
 
            self.always_throttled = False
51
 
        
52
 
 
53
41
class _TTYStringIO(StringIO):
54
42
    """A helper class which makes a StringIO look like a terminal"""
55
43