~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_progress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-29 22:03:03 UTC
  • mfrom: (5416.2.6 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100929220303-cr95h8iwtggco721
(mbp) Add 'break-lock --force'

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