testinggtk r324 - trunk/tests



Author: bjornl
Date: Mon Jun 30 19:45:46 2008
New Revision: 324
URL: http://svn.gnome.org/viewvc/testinggtk?rev=324&view=rev

Log:
Test for resizing window

Modified:
   trunk/tests/test_window.py

Modified: trunk/tests/test_window.py
==============================================================================
--- trunk/tests/test_window.py	(original)
+++ trunk/tests/test_window.py	Mon Jun 30 19:45:46 2008
@@ -109,3 +109,14 @@
     assert not win.get_resizable()
     win.set_resizable(True)
     assert win.get_resizable()
+
+def test_resize_window():
+    '''
+    Test that resizing ``gtk.Window`` immidiately updates its
+    size. Note that this only works because the window is not
+    realized.
+    '''
+    win = gtk.Window()
+    for size in (10, 20, 100, 95):
+        win.resize(size, size)
+        assert win.get_size() == (size, size)



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