diff options
author | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2007-07-26 19:50:35 +0000 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2007-07-26 19:50:35 +0000 |
commit | b1603f0a1a56e0af6c923bc4a53d000c0fa69c49 (patch) | |
tree | bdbb5910329885922c40b33046a44f4de94336ff /tests | |
parent | 29f0671d74c1a7b36027da6d5f38d165f873ab5c (diff) | |
download | pygtk-b1603f0a1a56e0af6c923bc4a53d000c0fa69c49.tar.gz |
wrap gtk.ScaleButton constructor and set_icon(), fix a couple of None parameters in defs.
svn path=/trunk/; revision=2861
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_scalebutton.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_scalebutton.py b/tests/test_scalebutton.py new file mode 100644 index 00000000..5cf33d75 --- /dev/null +++ b/tests/test_scalebutton.py @@ -0,0 +1,18 @@ +import unittest + +from common import gtk + +class ScaleButtonTest(unittest.TestCase): + def test_constructor(self): + scalebutt = gtk.ScaleButton(gtk.ICON_SIZE_SMALL_TOOLBAR, 0, 873, 2) + adj = scalebutt.props.adjustment + self.assertEqual(adj.step_increment, 2) + + def test_set_icons(self): + scalebutt = gtk.ScaleButton(gtk.ICON_SIZE_SMALL_TOOLBAR, 0, 873, 2) + icons = [gtk.STOCK_QUIT, gtk.STOCK_CANCEL, gtk.STOCK_EXECUTE] + scalebutt.set_icons(icons) + self.assertEqual(scalebutt.props.icons, icons) + +if __name__ == '__main__': + unittest.main() |