testinggtk r352 - trunk/tests



Author: bjornl
Date: Sun Aug  3 01:17:42 2008
New Revision: 352
URL: http://svn.gnome.org/viewvc/testinggtk?rev=352&view=rev

Log:
Test for default attributes

Modified:
   trunk/tests/test_toolitem.py

Modified: trunk/tests/test_toolitem.py
==============================================================================
--- trunk/tests/test_toolitem.py	(original)
+++ trunk/tests/test_toolitem.py	Sun Aug  3 01:17:42 2008
@@ -4,6 +4,22 @@
 import gtk
 import utils
 
+def test_default_attributes():
+    ti = gtk.ToolItem()
+    assert not ti.get_homogeneous()
+    assert not ti.get_expand()
+    assert not ti.get_use_drag_window()
+    assert not ti.get_is_important()
+    assert ti.get_visible_horizontal()
+    assert ti.get_visible_vertical()
+    assert ti.get_icon_size() == gtk.ICON_SIZE_LARGE_TOOLBAR
+    assert ti.get_orientation() == gtk.ORIENTATION_HORIZONTAL
+    assert ti.get_toolbar_style() == gtk.TOOLBAR_ICONS
+    assert ti.get_relief_style() == gtk.RELIEF_NONE
+
+    # Inherited properties
+    assert not ti.get_property('visible')
+
 def test_toolbar_style():
     '''
     Ensure that the toolitem notices changes in its toolbars style.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]