~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: Aaron Bentley
  • Date: 2006-02-22 14:39:42 UTC
  • mto: (2027.1.2 revert-subpath-56549)
  • mto: This revision was merged to the branch mainline in revision 1570.
  • Revision ID: abentley@panoramicfeedback.com-20060222143942-ae72299f2de66767
Fixed build_tree with symlinks

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
 
20
20
import os
 
21
from StringIO import StringIO
21
22
import sys
22
23
 
 
24
from bzrlib.progress import TTYProgressBar
23
25
from bzrlib.tests import TestCase
24
26
from bzrlib.ui import SilentUIFactory
25
27
from bzrlib.ui.text import TextUIFactory
50
52
        #                                   user=u'some\u1234')
51
53
        #                  , 'bogus')
52
54
 
 
55
 
 
56
    def test_progress_note(self):
 
57
        stderr = StringIO()
 
58
        stdout = StringIO()
 
59
        ui = TextUIFactory()
 
60
        pb = TTYProgressBar(to_file=stderr, to_messages_file=stdout)
 
61
        result = pb.note('t')
 
62
        self.assertEqual(None, result)
 
63
        self.assertEqual("t\n", stdout.getvalue())
 
64
        self.assertEqual("\r                                                                               \r", stderr.getvalue())