testinggtk r429 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r429 - trunk/tests
- Date: Tue, 9 Sep 2008 12:56:48 +0000 (UTC)
Author: bjornl
Date: Tue Sep 9 12:56:48 2008
New Revision: 429
URL: http://svn.gnome.org/viewvc/testinggtk?rev=429&view=rev
Log:
Add test for setting and getting the parent window attribute
Modified:
trunk/tests/test_widget.py
Modified: trunk/tests/test_widget.py
==============================================================================
--- trunk/tests/test_widget.py (original)
+++ trunk/tests/test_widget.py Tue Sep 9 12:56:48 2008
@@ -203,6 +203,20 @@
widget.set_flags(gtk.NO_WINDOW)
assert widget.flags() & gtk.NO_WINDOW
+def test_set_get_parent_window():
+ widget = gtk.Button()
+ assert not widget.get_parent_window()
+ window = gdk.Window(None,
+ 100, 100,
+ gdk.WINDOW_TOPLEVEL,
+ 0,
+ gdk.INPUT_OUTPUT,
+ x = 100, y = 100)
+ widget.set_parent_window(window)
+ assert widget.get_parent_window() == window
+ widget.set_parent_window(None)
+ assert not widget.get_parent_window()
+
def test_hierarchy_changed_signal():
'''
Ensure that the ``hierarchy-signal`` is emitted when the widget
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]