/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_commit.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-22 07:56:53 UTC
  • mto: This revision was merged to the branch mainline in revision 617.
  • Revision ID: v.ladeuil+lp@free.fr-20081022075653-10v8wlpmisbotnjg
Fix bug #286834 bu handling 'missing' files corner case.

* tests/test_diff.py:
(Test_IterChangesToStatus.test_status_missing_file, )
(Test_IterChangesToStatus.test_status_removed): Add tests.

* diff.py:
(iter_changes_to_status): Handle 'missing' files corner case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
651
651
    def _set_question_yes(self, dlg):
652
652
        """Set the dialog to answer YES to any questions."""
653
653
        self.questions = []
654
 
        def _question_yes(*args):
 
654
        def _question_yes(*args, **kwargs):
655
655
            self.questions.append(args)
656
656
            self.questions.append('YES')
657
657
            return gtk.RESPONSE_YES
660
660
    def _set_question_no(self, dlg):
661
661
        """Set the dialog to answer NO to any questions."""
662
662
        self.questions = []
663
 
        def _question_no(*args):
 
663
        def _question_no(*args, **kwargs):
664
664
            self.questions.append(args)
665
665
            self.questions.append('NO')
666
666
            return gtk.RESPONSE_NO
708
708
        self.assertEqual(last_rev, dlg.committed_revision_id)
709
709
        self.assertEqual(last_rev, tree.branch.last_revision())
710
710
 
711
 
    def test_commit_no_message(self):
 
711
    def test_commit_empty_message(self):
712
712
        tree = self.make_branch_and_tree('tree')
713
713
        self.build_tree(['tree/a', 'tree/b'])
714
714
        tree.add(['a'], ['a-id'])