~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_progress.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-23 17:54:07 UTC
  • mfrom: (5387 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5390.
  • Revision ID: john@arbash-meinel.com-20100823175407-yomx2h1x5v8amt6w
Merge bzr.dev 5387 in prep for NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        task.total_cnt = total
71
71
        return task
72
72
 
 
73
    def test_clear(self):
 
74
        # <https://bugs.launchpad.net/bzr/+bug/611127> clear must actually
 
75
        # send spaces to clear the line
 
76
        out, view = self.make_view()
 
77
        task = self.make_task(None, view, 'reticulating splines', 5, 20)
 
78
        view.show_progress(task)
 
79
        self.assertEqual(
 
80
'\r/ reticulating splines 5/20                                                    \r'
 
81
            , out.getvalue())
 
82
        view.clear()
 
83
        self.assertEqual(
 
84
'\r/ reticulating splines 5/20                                                    \r'
 
85
            + '\r' + 79 * ' ' + '\r',
 
86
            out.getvalue())
 
87
 
73
88
    def test_render_progress_no_bar(self):
74
89
        """The default view now has a spinner but no bar."""
75
90
        out, view = self.make_view()