~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_progress.py

  • Committer: Martin Pool
  • Date: 2010-07-21 09:58:42 UTC
  • mfrom: (4797.58.7 2.1)
  • mto: (5050.3.13 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: mbp@canonical.com-20100721095842-hz0obu8gl0x05nty
merge up 2.1 to 2.2

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
 
 
88
73
    def test_render_progress_no_bar(self):
89
74
        """The default view now has a spinner but no bar."""
90
75
        out, view = self.make_view()