[pygobject] [gi] require the name parameter when creatin a Gtk.ActionGroup



commit 226777cdb70fc72d206664ffd8b6737f7239d23f
Author: John (J5) Palmieri <johnp redhat com>
Date:   Mon Nov 22 18:32:28 2010 -0500

    [gi] require the name parameter when creatin a Gtk.ActionGroup

 gi/overrides/Gtk.py     |    3 +++
 tests/test_overrides.py |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 7875998..200ef21 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -75,6 +75,9 @@ Editable = override(Editable)
 __all__.append("Editable")
 
 class ActionGroup(Gtk.ActionGroup):
+    def __init__(self, name):
+        super(ActionGroup, self).__init__(name = name)
+
     def add_actions(self, entries, user_data=None):
         """
         The add_actions() method is a convenience method that creates a number
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index d91ddcf..7e0546a 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -61,6 +61,8 @@ class TestGdk(unittest.TestCase):
 class TestGtk(unittest.TestCase):
     def test_actiongroup(self):
         self.assertEquals(Gtk.ActionGroup, overrides.Gtk.ActionGroup)
+        self.assertRaises(TypeError, Gtk.ActionGroup)
+
         action_group = Gtk.ActionGroup (name = 'TestActionGroup')
         callback_data = "callback data"
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]