testinggtk r384 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r384 - trunk/tests
- Date: Sat, 23 Aug 2008 16:38:27 +0000 (UTC)
Author: bjornl
Date: Sat Aug 23 16:38:27 2008
New Revision: 384
URL: http://svn.gnome.org/viewvc/testinggtk?rev=384&view=rev
Log:
Add test checking that warning is emitted for button-press when widget is unrealized
Modified:
trunk/tests/test_scalebutton.py
Modified: trunk/tests/test_scalebutton.py
==============================================================================
--- trunk/tests/test_scalebutton.py (original)
+++ trunk/tests/test_scalebutton.py Sat Aug 23 16:38:27 2008
@@ -4,6 +4,7 @@
import gobject
import gtk
from gtk import gdk
+import utils
def test_default_attributes():
sb = gtk.ScaleButton(gtk.ICON_SIZE_INVALID, 0, 100, 2)
@@ -157,3 +158,13 @@
window = scale.get_toplevel()
print window.get_name()
assert window.get_name() == 'gtk-scalebutton-popup-window'
+
+ utils pass_on_warnings
+def test_unrealized_button_press():
+ '''
+ Ensure that a GtkWarning is printed when a ``gdk.BUTTON_PRESS``
+ event is activated on an unrealized ``gtk.ScaleButton``.
+ '''
+ sb = gtk.ScaleButton(gtk.ICON_SIZE_INVALID, 0, 10, 2)
+ ev = gdk.Event(gdk.BUTTON_PRESS)
+ sb.event(ev)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]