summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gjc@src.gnome.org>2007-07-10 10:03:59 +0000
committerGustavo J. A. M. Carneiro <gjc@src.gnome.org>2007-07-10 10:03:59 +0000
commita9dffd0030364b118fd01fe71683a7714b3da36e (patch)
tree3a92a579bf48dae16cb5970df9672a8b0d8b122e /tests
parent73824e8bc3843e48914de2f09ca551c0e5c3c271 (diff)
downloadpygtk-a9dffd0030364b118fd01fe71683a7714b3da36e.tar.gz
gtk.Action subclass test
svn path=/trunk/; revision=2837
Diffstat (limited to 'tests')
-rw-r--r--tests/test_actiongroup.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_actiongroup.py b/tests/test_actiongroup.py
index 56423d1c..f19de1b4 100644
--- a/tests/test_actiongroup.py
+++ b/tests/test_actiongroup.py
@@ -130,5 +130,22 @@ class ActionGroupTest(unittest.TestCase):
def cb(self, action):
return
+
+class ActionTest(unittest.TestCase):
+ def testActionSubclass(self):
+
+ class MyAction(gtk.Action):
+ __gtype_name__ = 'MyAction'
+ def __init__(self):
+ self._activated = False
+ gtk.Action.__init__(self, "name", "label", "tooltip", "stock_id")
+ def do_activate(self):
+ self._activated = True
+
+ myaction = MyAction()
+ myaction.activate()
+ self.assertEqual(myaction._activated, True)
+
+
if __name__ == '__main__':
unittest.main()