~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: mbp at sourcefrog
  • Date: 2006-10-31 01:30:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2114.
  • Revision ID: mbp@sourcefrog.net-20061031013031-da3047f0d9fb1f64
Use regular progress-bar classes, not a special mechanism

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
            "\rwhat do you want\\? \\[y/n\\]:what do you want\\? \\[y/n\\]:", 
200
200
            output):
201
201
            self.fail("didn't match factory output %r, %s" % (factory, output))
202
 
 
203
 
    def test_text_factory_progress_line(self):
204
 
        out = StringIO()
205
 
        err = StringIO()
206
 
        ui = bzrlib.ui.text.TextUIFactory(stdout=out, stderr=err)
207
 
        ui.show_progress_line('10/20 hello world')
208
 
        self.assertContainsRe(err.getvalue(), 
209
 
                '\r10/20 hello world')
210
 
        ui.show_progress_line('20/20 hello world')
211
 
        self.assertContainsRe(err.getvalue(), '\r20/20 hello world')