~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: Martin Pool
  • Date: 2006-02-22 04:29:54 UTC
  • mfrom: (1566 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060222042954-60333f08dd56a646
[merge] from bzr.dev before integration
Fix undefined ordering in sign_my_revisions breaking tests

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())