summaryrefslogtreecommitdiff
path: root/tests/test_scalebutton.py
blob: 5cf33d751cb1f75dfc0bb4276740f3d6454bf384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()