testinggtk r313 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r313 - trunk/tests
- Date: Sun, 29 Jun 2008 13:05:33 +0000 (UTC)
Author: bjornl
Date: Sun Jun 29 13:05:33 2008
New Revision: 313
URL: http://svn.gnome.org/viewvc/testinggtk?rev=313&view=rev
Log:
Test for the gtk.HAS_GRAB flag
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 29 13:05:33 2008
@@ -149,3 +149,15 @@
widget = gtk.Button()
widget.grab_add()
assert gtk.grab_get_current() == widget
+
+def test_has_grab_flag():
+ '''
+ Ensure that when a widget is grabbed, the ``gtk.HAS_GRAB`` flag is
+ set on that flag and unset when the grab is removed.
+ '''
+ widget = gtk.Button()
+ assert not widget.flags() & gtk.HAS_GRAB
+ widget.grab_add()
+ assert widget.flags() & gtk.HAS_GRAB
+ widget.grab_remove()
+ assert not widget.flags() & gtk.HAS_GRAB
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]