/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/workingtree_implementations/test_commit.py

  • Committer: Ian Clatworthy
  • Date: 2007-06-20 03:32:32 UTC
  • mto: (2539.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2540.
  • Revision ID: ian.clatworthy@internode.on.net-20070620033232-eod2sjmf2ath8ya3
Fix whitespace and improve tests to cover actual progress messages

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    def update(self, message, count=None, total=None):
61
61
        """See progress.ProgressBar.update()."""
62
62
        if self.depth == 1:
63
 
            self._calls.append(("update", count, total))
 
63
            self._calls.append(("update", count, total, message))
64
64
 
65
65
 
66
66
class TestCapturingUI(TestCase):
75
75
        pb2.update('foo', 0, 1)
76
76
        pb2.finished()
77
77
        pb1.finished()
78
 
        self.assertEqual([("update", 0, 1)], factory._calls)
 
78
        self.assertEqual([("update", 0, 1, 'foo')], factory._calls)
79
79
 
80
80
 
81
81
class TestCommit(TestCaseWithWorkingTree):
349
349
        # 2 files don't trigger an update, as 'a' and 'c' are not 
350
350
        # committed.
351
351
        self.assertEqual(
352
 
            [('update', 1, 4),
353
 
             ('update', 1, 4),
354
 
             ('update', 1, 4),
355
 
             ('update', 1, 4),
356
 
             ('update', 1, 4),
357
 
             ('update', 2, 4),
358
 
             ('update', 3, 4),
359
 
             ('update', 4, 4)],
 
352
            [('update', 1, 4, 'Collecting changes [Entry 0/?] - Stage'),
 
353
             ('update', 1, 4, 'Collecting changes [Entry 1/4] - Stage'),
 
354
             ('update', 1, 4, 'Collecting changes [Entry 2/4] - Stage'),
 
355
             ('update', 1, 4, 'Collecting changes [Entry 3/4] - Stage'),
 
356
             ('update', 1, 4, 'Collecting changes [Entry 4/4] - Stage'),
 
357
             ('update', 2, 4, 'Saving data locally - Stage'),
 
358
             ('update', 3, 4, 'Updating the working tree - Stage'),
 
359
             ('update', 4, 4, 'Running post commit hooks - Stage')],
360
360
            factory._calls
361
361
           )