diff options
author | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-07-10 10:03:59 +0000 |
---|---|---|
committer | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-07-10 10:03:59 +0000 |
commit | a9dffd0030364b118fd01fe71683a7714b3da36e (patch) | |
tree | 3a92a579bf48dae16cb5970df9672a8b0d8b122e /tests | |
parent | 73824e8bc3843e48914de2f09ca551c0e5c3c271 (diff) | |
download | pygtk-a9dffd0030364b118fd01fe71683a7714b3da36e.tar.gz |
gtk.Action subclass test
svn path=/trunk/; revision=2837
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_actiongroup.py | 17 |
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() |