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

  • Committer: Robert Collins
  • Date: 2006-02-16 05:54:02 UTC
  • mto: (1534.1.24 integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060216055402-bb6afc4d15c715cd
split out converter logic into per-format objects.

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