/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 brzlib/tests/testui.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
 
20
20
 
21
 
from .. import (
 
21
from brzlib import (
22
22
    progress,
23
23
    ui,
24
24
    )
26
26
 
27
27
class ProgressRecordingUIFactory(ui.UIFactory, progress.DummyProgress):
28
28
    """Captures progress updates made through it.
29
 
 
 
29
    
30
30
    This is overloaded as both the UIFactory and the progress model."""
31
31
 
32
32
    def __init__(self):
41
41
    def finished(self):
42
42
        self.depth -= 1
43
43
 
44
 
    def __enter__(self):
45
 
        return self
46
 
 
47
 
    def __exit__(self, exc_type, exc_val, exc_tb):
48
 
        self.finished()
49
 
        return False
50
 
 
51
44
    def update(self, message, count=None, total=None):
52
45
        if self.depth == 1:
53
46
            self._calls.append(("update", count, total, message))