testinggtk r395 - trunk/tests/gdk



Author: bjornl
Date: Sat Aug 30 00:09:56 2008
New Revision: 395
URL: http://svn.gnome.org/viewvc/testinggtk?rev=395&view=rev

Log:
Test for showing and hiding a gdk.Window

Modified:
   trunk/tests/gdk/test_window.py

Modified: trunk/tests/gdk/test_window.py
==============================================================================
--- trunk/tests/gdk/test_window.py	(original)
+++ trunk/tests/gdk/test_window.py	Sat Aug 30 00:09:56 2008
@@ -118,3 +118,19 @@
     assert area.y == 0
     assert area.width == 50
     assert area.height == 50
+
+def test_show_and_hide():
+    '''
+    Ensure that showing and hiding a window changes its ``is_visible``
+    attribute.
+    '''
+    window = gdk.Window(None,
+                        100, 100,
+                        gdk.WINDOW_TOPLEVEL,
+                        0,
+                        gdk.INPUT_OUTPUT)
+    assert not window.is_visible()
+    window.show()
+    assert window.is_visible()
+    window.hide()
+    assert not window.is_visible()



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