testinggtk r362 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r362 - trunk/tests
- Date: Mon, 4 Aug 2008 21:12:42 +0000 (UTC)
Author: bjornl
Date: Mon Aug 4 21:12:42 2008
New Revision: 362
URL: http://svn.gnome.org/viewvc/testinggtk?rev=362&view=rev
Log:
Organizing some code
Modified:
trunk/tests/test_widget.py
Modified: trunk/tests/test_widget.py
==============================================================================
--- trunk/tests/test_widget.py (original)
+++ trunk/tests/test_widget.py Mon Aug 4 21:12:42 2008
@@ -141,6 +141,23 @@
widget.set_flags(gtk.NO_WINDOW)
assert widget.flags() & gtk.NO_WINDOW
+def test_hierarchy_changed_signal():
+ '''
+ Ensure that the ``hierarchy-signal`` is emitted when the widget
+ gets a different parent.
+ '''
+ data = []
+ def hierarchy_cb(widget, prev_top):
+ data.append((widget, prev_top))
+ widget = gtk.Button()
+ widget.connect('hierarchy-changed', hierarchy_cb)
+ win = gtk.Window()
+ win.add(widget)
+ assert data[0] == (widget, None)
+
+######################################################################
+##### Focus and grab tests ###########################################
+######################################################################
def test_set_get_can_focus():
widget = gtk.Button()
assert widget.get_property('can-focus')
@@ -188,16 +205,3 @@
assert not gtk.grab_get_current()
widget.grab_remove()
-def test_hierarchy_changed_signal():
- '''
- Ensure that the ``hierarchy-signal`` is emitted when the widget
- gets a different parent.
- '''
- data = []
- def hierarchy_cb(widget, prev_top):
- data.append((widget, prev_top))
- widget = gtk.Button()
- widget.connect('hierarchy-changed', hierarchy_cb)
- win = gtk.Window()
- win.add(widget)
- assert data[0] == (widget, None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]