testinggtk r288 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r288 - trunk/tests
- Date: Sat, 28 Jun 2008 11:24:13 +0000 (UTC)
Author: bjornl
Date: Sat Jun 28 11:24:12 2008
New Revision: 288
URL: http://svn.gnome.org/viewvc/testinggtk?rev=288&view=rev
Log:
Test for grabbing
Modified:
trunk/tests/test_widget.py
Modified: trunk/tests/test_widget.py
==============================================================================
--- trunk/tests/test_widget.py (original)
+++ trunk/tests/test_widget.py Sat Jun 28 11:24:12 2008
@@ -140,3 +140,12 @@
assert (widget.flags() & gtk.NO_WINDOW) == 0
widget.set_flags(gtk.NO_WINDOW)
assert widget.flags() & gtk.NO_WINDOW
+
+def test_grab_add():
+ '''
+ Ensure that when a widget is made the current grabbing widget,
+ then ``gtk.grab_get_current`` returns that widget.
+ '''
+ widget = gtk.Button()
+ widget.grab_add()
+ assert gtk.grab_get_current() == widget
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]