testinggtk r107 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r107 - trunk/tests
- Date: Sun, 8 Jun 2008 21:02:01 +0000 (UTC)
Author: bjornl
Date: Sun Jun 8 21:02:01 2008
New Revision: 107
URL: http://svn.gnome.org/viewvc/testinggtk?rev=107&view=rev
Log:
Add test for gtk.Widget.get_toplevel()
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:02:01 2008
@@ -21,6 +21,17 @@
assert widget.get_child_visible()
assert not widget.has_screen()
assert widget.get_display()
+ assert widget.get_toplevel() == widget
+
+def test_toplevel_in_window():
+ '''
+ Ensure that the toplevel for a ``gtk.Widget`` is the
+ ``gtk.Window`` it is packed in.
+ '''
+ win = gtk.Window()
+ widget = gtk.Button()
+ win.add(widget)
+ assert widget.get_toplevel() == win
@utils.pass_on_warnings
def test_realize_not_anchred_widget():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]