testinggtk r108 - trunk/tests



Author: bjornl
Date: Sun Jun  8 21:03:59 2008
New Revision: 108
URL: http://svn.gnome.org/viewvc/testinggtk?rev=108&view=rev

Log:
Add test for uknown style property

Modified:
   trunk/tests/test_widget.py

Modified: trunk/tests/test_widget.py
==============================================================================
--- trunk/tests/test_widget.py	(original)
+++ trunk/tests/test_widget.py	Sun Jun  8 21:03:59 2008
@@ -1,11 +1,11 @@
-import gtk
-import utils
-
 '''
 Tests for the ``gtk.Widget`` class. Since that class is abstract,
 subclasses of it is used in these tests.
 '''
 
+import gtk
+import utils
+
 def test_wrapper_complete():
     '''
     Ensure that all public attributes are wrapped.
@@ -93,3 +93,15 @@
     realize an unanchored widget.
     '''
     gtk.Button().realize()
+
+def test_get_unknown_style_property():
+    '''
+    Ensure that attempting to get the value of an unknown style
+    property results in a ``TypeError``.
+    '''
+    b = gtk.Button()
+    try:
+        b.style_get_property('foobar')
+        assert False
+    except TypeError:
+        assert True



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