summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@src.gnome.org>2007-07-26 19:50:35 +0000
committerGian Mario Tagliaretti <gianmt@src.gnome.org>2007-07-26 19:50:35 +0000
commitb1603f0a1a56e0af6c923bc4a53d000c0fa69c49 (patch)
treebdbb5910329885922c40b33046a44f4de94336ff /tests
parent29f0671d74c1a7b36027da6d5f38d165f873ab5c (diff)
downloadpygtk-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.py18
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()