testinggtk r435 - trunk/tests



Author: bjornl
Date: Tue Sep  9 16:51:59 2008
New Revision: 435
URL: http://svn.gnome.org/viewvc/testinggtk?rev=435&view=rev

Log:
tc for default flags, tc for set_parent throws a warning

Modified:
   trunk/tests/test_window.py

Modified: trunk/tests/test_window.py
==============================================================================
--- trunk/tests/test_window.py	(original)
+++ trunk/tests/test_window.py	Tue Sep  9 16:51:59 2008
@@ -10,6 +10,14 @@
     assert win.get_opacity() == 1
     assert isinstance(win.get_group(), gtk.WindowGroup)
 
+def test_default_flags():
+    win = gtk.Window()
+    flags = win.flags()
+    assert gtk.TOPLEVEL & flags
+    assert gtk.SENSITIVE & flags
+    assert gtk.PARENT_SENSITIVE & flags
+    assert gtk.DOUBLE_BUFFERED & flags
+
 def test_property_change_fires_window_state_event():
     '''
     Ensure that the 'window-state-event' signal is fired when the
@@ -290,3 +298,13 @@
     '''
     win = gtk.Window()
     win.destroy()
+
+ utils pass_on_warnings 
+def test_set_parent_on_toplevel():
+    '''
+    Ensure that set_parent on a gtk.Window doesn't work because it is
+    a top-level.
+    '''
+    win = gtk.Window()
+    parent = gtk.HBox()
+    win.set_parent(parent)



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