/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-23 08:14:59 UTC
  • mto: This revision was merged to the branch mainline in revision 618.
  • Revision ID: v.ladeuil+lp@free.fr-20081023081459-3rgjsohomf8rbe44
Fix bug #131589 by using a gtk.Window instead of a gtk.Dialog.

* status.py:
(StatusWindow): Renamed from StatusDialog, we're a window now.
(StatusWindow.__init__, StatusWindow._create): Adjusted to Window
inheritance.

* __init__.py:
(cmd_gstatus.run): Use a Window instead of a dialog.

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'])