testinggtk r320 - trunk/tests



Author: bjornl
Date: Sun Jun 29 23:06:53 2008
New Revision: 320
URL: http://svn.gnome.org/viewvc/testinggtk?rev=320&view=rev

Log:
Check properties from the superclass gtk.CellRenderer too

Modified:
   trunk/tests/test_cellrenderertext.py

Modified: trunk/tests/test_cellrenderertext.py
==============================================================================
--- trunk/tests/test_cellrenderertext.py	(original)
+++ trunk/tests/test_cellrenderertext.py	Sun Jun 29 23:06:53 2008
@@ -9,6 +9,30 @@
     assert not cr.get_property('editable')
     assert not cr.get_property('text')
 
+    # gtk.CellRenderer properties
+    bg = cr.get_property('cell-background-gdk')
+    assert bg.red == 0
+    assert bg.green == 0
+    assert bg.blue == 0
+
+    assert cr.get_property('width') == -1
+    assert cr.get_property('height') == -1
+
+    # gtk.CellRendererText overrides these defaults.
+    assert cr.get_property('xalign') == 0.0
+    assert cr.get_property('yalign') == 0.5
+
+    assert cr.get_property('xpad') == 2
+    assert cr.get_property('ypad') == 2
+
+    assert not cr.get_property('cell-background-set')
+    assert not cr.get_property('is-expanded')
+    assert not cr.get_property('is-expander')
+
+    assert cr.get_property('mode') == gtk.CELL_RENDERER_MODE_INERT
+    assert cr.get_property('sensitive') == True
+    assert cr.get_property('visible') == True
+
 def test_editing_started_signal():
     '''
     Ensure that the ``editing-started`` signal is emitted when



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